471,618 Members | 1,316 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

floats mess up backgrounds and lists

http://www.frostjedi.com/terra/scrip...ackground.html

In Internet Explorer, the background works as desired. In FireFox,
however, the red background of "menu" is covering up the background of
"main".

Also, lists are not being displayed as desired in either. I'd like
the bullets to appear outside of "menu", but they don't. In FireFox,
they display inside of "menu" and in Internet Explorer, they don't
appear at all (or if they do, they appear under "menu").

Any ideas as to how I can achieve the desired effects?

Nov 12 '07 #1
1 1695
yawnmoth wrote:
http://www.frostjedi.com/terra/scrip...ackground.html

In Internet Explorer, the background works as desired. In FireFox,
however, the red background of "menu" is covering up the background of
"main".
IE is violating the specs here.

From CSS 2.1 9.5 Floats:

Since a float is not in the flow, non-positioned block boxes created
before and after the float box flow vertically as if the float didn't
exist. However, line boxes created next to the float are shortened to
make room for margin box of the float....

The div's background is part of the div itself, which acts as if the
float doesn't exist for positioning purposes, and the menu thus goes on
top of the background.
Also, lists are not being displayed as desired in either. I'd like
the bullets to appear outside of "menu", but they don't. In FireFox,
they display inside of "menu" and in Internet Explorer, they don't
appear at all (or if they do, they appear under "menu").
The outer part of the list -- the bullets -- is not a line box and will
be obscured by the float. The individual elements are line boxes and are
thus shunted to the side of the float.
Any ideas as to how I can achieve the desired effects?
Which way is the menu supposed to go? To the left of all or just to the
left of the list? In any case, adding a sufficiently thick margin will
achieve the effects. 9 ems seems to be the right amount.

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Nov 12 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Chris Beall | last post: by
8 posts views Thread by Madhusudan Singh | last post: by
4 posts views Thread by Adam Warner | last post: by
6 posts views Thread by Jeffrey Goldberg | last post: by
11 posts views Thread by Steve | last post: by
9 posts views Thread by joanne matthews (RRes-Roth) | last post: by
6 posts views Thread by Peter Wuertz | last post: by
1 post views Thread by XIAOLAOHU | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.