Display problems with DIVs

T

test2000

Hello

I have the following code

<div id="Page" style="width: 300px;">
<div id="map" style="width: 280px;">...</div>
<div id="HiddenMenu" style="width: 20px;"> ... </div>
</div>

CSS definition for DIV "map" --> float: left;

in the DIV "HiddenMenu" is a table which is exactly 20px wide.

Unfortunately the DIV "HiddenMenu" is shown under the DIV "map", not
to the right as desired. This problems only occures in IE6 and lower,
not in IE7 or Firefox.

I increased the width of DIV "Page", to 301 and 302. Nothing happened.
But with a value of 303 the DIV "HiddenMenu" is shown on the right
side. But now DIV "Page" is 303 wide and there is a gap of 3 pixel
between the DIV "map" and "HiddenMenu"

Here is the link to the HTML file: http://vueltaa.awardspace.com/problem.html

I read about the Box Model Hack. But these doesn't bring a solution as
my margin and padding are both zero.

Does anyone have a hint as were to look for a solution for this
problem?

Any help is greatly appreciated.

thx
 
C

Chaddy2222

test2000 said:
Hello

I have the following code

<div id="Page" style="width: 300px;">
<div id="map" style="width: 280px;">...</div>
<div id="HiddenMenu" style="width: 20px;"> ... </div>
</div>

CSS definition for DIV "map" --> float: left;

in the DIV "HiddenMenu" is a table which is exactly 20px wide.

Unfortunately the DIV "HiddenMenu" is shown under the DIV "map", not
to the right as desired. This problems only occures in IE6 and lower,
not in IE7 or Firefox.
Frankly I would not bother supporting IE5.5 or lower, it's a waste of
time really.
I increased the width of DIV "Page", to 301 and 302. Nothing happened.
But with a value of 303 the DIV "HiddenMenu" is shown on the right
side. But now DIV "Page" is 303 wide and there is a gap of 3 pixel
between the DIV "map" and "HiddenMenu"

<snip>
You should use flash if you want perfect pixel design, it's the only
way to do it. HTML is not really designed for that (it's designed to
scale according to window size.)
If you however want to continue down the HTML path, then visit
http://www.htmldog.com and learne how to code properly!.
Here is a free clue, don't assign widths to anything unless they
really need it and then only use % or em units which will scale ok
across various window sizes.
 
D

dorayme

Chaddy2222 said:
Frankly I would not bother supporting IE5.5 or lower, it's a waste of
time really.

Can you pick on anything even more marginal to OP's question?
 
C

Chaddy2222

dorayme said:
Can you pick on anything even more marginal to OP's question?
I not really trying to pick on the OP. However the CSS support in
browsers before IE6 is not that good and so it would be easier for the
OP to just not bother supporting them (or if you really want to
support IE5.0 then provide a fall-back solution.
But you stilll should code for IE6 as 30% of the browser market still
use it.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Wed, 01 Aug 2007 07:21:54
GMT test2000 scribed:
Hello

I have the following code

<div id="Page" style="width: 300px;">
<div id="map" style="width: 280px;">...</div>
<div id="HiddenMenu" style="width: 20px;"> ... </div>
</div>

CSS definition for DIV "map" --> float: left;

in the DIV "HiddenMenu" is a table which is exactly 20px wide.

Unfortunately the DIV "HiddenMenu" is shown under the DIV "map", not
to the right as desired. This problems only occures in IE6 and lower,
not in IE7 or Firefox.

I increased the width of DIV "Page", to 301 and 302. Nothing happened.
But with a value of 303 the DIV "HiddenMenu" is shown on the right
side. But now DIV "Page" is 303 wide and there is a gap of 3 pixel
between the DIV "map" and "HiddenMenu"

Here is the link to the HTML file:
http://vueltaa.awardspace.com/problem.html

I read about the Box Model Hack. But these doesn't bring a solution as
my margin and padding are both zero.

Does anyone have a hint as were to look for a solution for this
problem?

Any help is greatly appreciated.

I copied your markup and the 2nd div is under the first in _all_ browsers
I tried.
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top