CSS Window Maximisation Issue

C

C Garrod

Hello,

I have been devloping a layout using CSS. The header consists of 3 DIV tags
which segment the top of the page into 3 columns. The problem is when I
open the page in a maximised window in MSIE6 the last DIV tag drops down a
line and resides under the top left DIV.

Has anyone come across this before? If so do you know a work around? This
does not seem to occur in Netscape 7.0.

The CSS Code is copied below...

..headleft {
float: left;
height: 69px;
width: 33%;
border-bottom-style: solid;
border-bottom-color: 330066;
color: #330066;
}
..headright {
float: left;
height: 69px;
width: 33%;
text-align: right;
border-bottom-style: solid;
border-bottom-color: 330066;
}
..headmid {

height: 69px;
float: left;
width: 34%;
text-align: center;
border-bottom-style: solid;
border-bottom-color: 330066;
}

And HTML if anyone wants to simulate the page...



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<em></em>
<div class="headleft"><span id="larger">Address Line 1</span><br>
<span id="small">Line 2<br>Tel: (00000) 22 xxxx<br>Fax: (00000) 22 xxxx
</span></div>
<div class="headmid">Middle</div>
<div class="headright">Right</div>
</body></body>
</html>
 
E

Eric Bohlman

I have been devloping a layout using CSS. The header consists of 3 DIV
tags which segment the top of the page into 3 columns. The problem is
when I open the page in a maximised window in MSIE6 the last DIV tag
drops down a line and resides under the top left DIV.
[snip]

.headmid {
height: 69px;
float: left;
width: 34%;
text-align: center;
border-bottom-style: solid;
border-bottom-color: 330066;
}

If I change the width here to 33%, the problem goes away. I'm guessing
it's some sort of rounding problem where some of the widths, when
calculated, get rounded up to the nearest pixel giving a total width of
slightly more than 100%.
 
T

Toby A Inkster

Eric said:
If I change the width here to 33%, the problem goes away. I'm guessing
it's some sort of rounding problem where some of the widths, when
calculated, get rounded up to the nearest pixel giving a total width of
slightly more than 100%.

And 33% + 33% + 34% + page margins and padding + borders on the divs =
more than 100%.

Also "border-bottom-color: 330066;" is missing its hash mark "#".
 
C

C Garrod

Thats great thanks, but now I have a 1% gap on the right hand side and it
needs to cross the whole page from one side to the other :(

Can anyone recommend a way to achieve this in CSS?

Chris.
 
W

William Tasso

C Garrod wrote:

[3-columns]
Thats great thanks, but now I have a 1% gap on the right hand side
and it needs to cross the whole page from one side to the other :(

Can anyone recommend a way to achieve this in CSS?

Tricky to test without a URL. DIVs will expand to fill the space available
to them - what happens (on your page) if you omit the width on the rightmost
column?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top