In article <ebj0b.818$xD6.676 (AT) newsread3 (DOT) news.pas.earthlink.net> in
comp.infosystems.
www.authoring.stylesheets, Dan Phiffer
<danAT (AT) phifferDOT (DOT) com> wrote:
Quote:
Shouldn't div a inheret the
specified width from the 'div' selector? |
Yes, of course (though "inherit" isn't quite the right word).
As I said, specifying a width for the containing div but not the
contained divs is almost certainly your problem. Let me be a little
less Delphic and explain:
A div with no specified width or margins grows to contain its
content (!), being limited only by the size of the block that
contains it. So the floated div, since it has lots of content, grows
as wide as necessary to contain that content, within your (ill-
advised) pixel width for the containing div. That leaves no room for
the non-floated div, which flows "around" the floated div, just as
it's supposed to.
If you specify a width or max-width for the floated div, it should
display as you wish -- on _your_ monitor, with _your_ font choice,
screen size, window size, and so forth. Your pixel specification
guarantees that the display will be bad for a huge number of people.
--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec:
http://www.w3.org/TR/html401/
validator:
http://validator.w3.org/
CSS 2 spec:
http://www.w3.org/TR/REC-CSS2/
validator:
http://jigsaw.w3.org/css-validator/