CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.


Tutorials
| Forums

Download to Enter
| Contest Rules

DOWNLOAD INTEL® GPA FOR FREE

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 6th, 2010, 01:13 PM
jameshead jameshead is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 1 jameshead User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 33 sec
Reputation Power: 0
Problem with table position on page

I've been tweaking a bit of the site I edit for Oxford Hash House Harriers (search Google for Oxford Hash House Harriers and our site will appear at the top) and trying to get a blue bar for the left and right side bars all down the page, which I've now succeeded in doing, however in my changes something has changed because now there is a large gap between any content and a table but only in some browsers. The tables are used for actual data, not for layout. I use CSS and <div> for layout.

The layout is along these lines:

Code:
<body>
<div id="page">

<div id="banner">
<div id="leftlogo"> <!-- logo here --> </div>
<div id="rightlogo"> <!-- logo here --> </div>
<div id="oh3banner"><p class="pagetitle">Oxford H3</p></div>
</div><!-- close div banner -->

<div id="mainbody">

<div id="wrap1">
<div id="wrap2">

<div id="leftnavigation">
</div><!-- close div leftnavigation -->

<div id="rightnavigation">
</div><!-- close div rightnavigation -->

<div id="content">
<h1>Oxford Hash House Harriers</h1>
<h2>Oxford H3 Hash Diary </h2>
<div id="hashdiary">
<table summary="Oxford H3 Run Diary">
<caption>Forthcoming Oxford H3 Hashes</caption>
<colgroup>
<col id="date" />
<col id="postcode" />
<col id="venue" />
<col id="hare" />
<col id="beermaster" />
<col id="chef" />
<col id="run" />
</colgroup>
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">Post Code & Grid Ref.</th>
<th scope="col">Venue</th>
<th scope="col">Hares</th>
<th scope="col">Beer Master</th>
<th scope="col">Chef</th>
<th scope="col">Run#</th>
</tr>
</thead>
<tbody>

<tr>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
<td>data</td>
</tr>
</tbody>
</table>
</div>
</div><!-- close div content -->

</div> <!-- close div wrap1 -->
</div> <!-- close div wrap2 -->

</div> <!-- close div mainbody -->
</div><!-- close div page -->
</body>


Whilst the relevant (I think) parts of the CSS look like this:
DIV#page{
margin-top: 0px;
}

DIV#banner{
width:100%;
background-color : #06168a;
height : 130px;
margin-left : 0px;
margin-top: 0px;
position : absolute;
top: 0px;
float : none;
}

DIV#oh3banner{
clear : none;
background-image : url('images/oxfordh3banner.jpg');
background-repeat : no-repeat;
height : 110px;
margin-top: 10px;
background-position : center;
}

DIV#mainbody{
margin-top: 130px;
}

DIV#wrap1{
background-color : #06168a;
}

DIV#wrap2{
background-color : #06168a;
}

DIV#leftnavigation{
width:15%;
background-color : #06168a;
margin-left : 0%;
float: left;
}

DIV#rightnavigation{
width:15%;
background-color : #06168a;
margin-right : 0%;
margin-left : 3%;
float: right;
}

DIV#content{
width:auto;
margin-left : 15%;
margin-right: 15%;
padding-left: 5px;
padding-right: 5px;
background-color: White;
}


I found to begin with that there was a very large gap between the table and any content on the page in all browsers until I put a <div> </div> around the actual table itself. When I did this the page looks okay in Firefox and Safari, but still looks incorrect in Internet Explorer and Chrome. It looks to me as if the table is being pushed below the content in the right sidebar in IE or the left sidebar in Chrome for some reason.

I've been messing about for a while now trying to get this to work but without success. Can anybody spot where I'm going wrong?
Regards,
James

Reply With Quote
  #2  
Old March 6th, 2010, 08:44 PM
hase hase is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 100 hase User rank is Corporal (100 - 500 Reputation Level)hase User rank is Corporal (100 - 500 Reputation Level)hase User rank is Corporal (100 - 500 Reputation Level)hase User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 14 m 5 sec
Reputation Power: 4
I'm still a little confused as with the code you gave us and the website...

but anyway.

Did this problem just start recently with the addition of the blue bars? Or did you just start noticing it? :P

I know firefox and IE like displaying values differently at times. If it were me, I'd start out by playing with some values and seeing if it's shifts around. Is that white area with content a table?

I typically use table layouts, as they have less spacing issues (IMO anyway) - and I've actually never used just divs. I'm a div virgin.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Problem with table position on page


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap