![]() |
![]() ![]() |
![]() |
Brad364 |
![]()
Post
#1
|
Group: Members Posts: 4 Joined: 6-September 07 Member No.: 3,735 ![]() |
Using CSS, I put a red dashed border around my <body> tag. Within the HTML body I have one <div> (black border) that has two sub-<div>'s within it (green and blue borders)
I put dashed borders on each of the three <div>'s. See My Webpage Can any one tell me how come the content of one of the <div>'s (blue) is rendered outside the <body> ? Interesting note: As I expand the content in the green <div> it's border expands as does the red body div border. But the green div seems to be aloof of the body and its parent black div. Problem occurs in both FF and IE7. Thanx in advance. |
pandy |
![]()
Post
#2
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,737 Joined: 9-August 06 Member No.: 6 ![]() |
Hi! Sorry for the late reply. I think everyone managed to overlook your post.
![]() The menu hangs out from BODY because it's floated. Floats take up no space, hence don't make the box they are contained in expand. BODY isn't larger than its content and since floats don't take up any space, they don't add to the height of that content. There's an image that illustrates this behavior at the end of this section in the spec. http://www.w3.org/TR/CSS2/visuren.html#floats |
Brian Chandler |
![]()
Post
#3
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 ![]() |
Incidentally, the text in your menu is too wide (with my current settings) for the box it's in, so CSS helpfully hides some of it. One does wonder quite what the "conceivers" of CSS were smoking.
The general principle seems to be "fail-dangerous". |
pandy |
![]()
Post
#4
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,737 Joined: 9-August 06 Member No.: 6 ![]() |
Incidentally, the text in your menu is too wide (with my current settings) for the box it's in, so CSS helpfully hides some of it. Only if you tell it to. CODE #container { background-color: #FFFEF0; overflow: hidden; width: 900px; border: dashed black 1px; QUOTE One does wonder quite what the "conceivers" of CSS were smoking. Maybe they thought people would actually read what they wrote... ![]() |
Brian Chandler |
![]()
Post
#5
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 ![]() |
QUOTE QUOTE(Brian Chandler @ Sep 15 2007, 10:06 AM) * Incidentally, the text in your menu is too wide (with my current settings) for the box it's in, so CSS helpfully hides some of it. Only if you tell it to. Uh, no. If the designer of the page tells it to. I think this means that in any situation in which there may be lines too long to wrap (which in a properly fail-safe design would mean everywhere), the CSS "overflow: hidden" specification is not usable. QUOTE QUOTE One does wonder quite what the "conceivers" of CSS were smoking. Maybe they thought people would actually read what they wrote... wink.gif Look, these poor muddled souls couldn't write anything clearly to save their lives (try finding out what "absolute" means in their dialect of Norwegian by the normal process of looking at the spec), so reading what they wrote doesn't help too much. What, out of curiosity is "floats don't take up any space" supposed to mean? Do you know what it would mean if it were English? (I'm guessing you're quoting from the Norwegian.) |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 14th June 2024 - 07:14 PM |