Forum Moderators: not2easy

Message Too Old, No Replies

divs not actually spaning nested divs?

a bla bla bla buh blah bla?

         

siliconbee

12:38 am on Oct 10, 2003 (gmt 0)

10+ Year Member



alright I'm making the move to strictly table free layouts, mostly just to make sure I know how, and I'm having some irritating problems (IE 6). I've got a layout with a bunch of nested divs, such as:

<page>
<header>
<logo>an image</logo>
<nav>some UL list</nav>
</header>
<content>
some text
</content>
<footer>
<footerL>text</footerL>
<footerR>text</footerR>
</footer>
</page>

(assume each <tagname> really means <div id="tagname"> - it's just faster this way)

the code validates for xhtml1 strict and css2.

If I set the background-color for #footerL and #footerR, which contain text, that works out nicely. But for some reason, if I set the background-color for, say, #footer or #content, I get nuthin. Well, ok, sometimes I get a thin line at the very top of where that particular div begins. But it doesn't seem to span the entire height of the whatever the div contains. I tried setting height: 100% but that doesn't behave very consistently between say IE5 and 6 (and I don't even want to look at other browsers yet).

Anyone know what I'm trying to say? Better yet, anyone know what I'm doing wrong (and please please don't say "you're using IE6!")?

Reflection

5:32 pm on Oct 10, 2003 (gmt 0)

10+ Year Member



Any chance you have floated content inside the div's that arent working? If you do the problem is because the div's dont have any 'content' in them because floated elements are out of the normal flow of the document. So basically the div's dont know how tall(height) they are supposed to be.

siliconbee

5:47 pm on Oct 10, 2003 (gmt 0)

10+ Year Member



you are so right. Thank you!

siliconbee

6:31 pm on Oct 10, 2003 (gmt 0)

10+ Year Member



ok wait that's the case for the footer, it contains two floaters (insert your own dirty joke here) but that's not the case for <content>. So far, that div just has filler and it's an <h3> tag and a short <ul>. Here background color for <content> is not showing up either.

<edit>nevermind, nevermind - my stoopid css code error.</edit>