What's wrong with using the "height" element to make sure the nav div and content div are the same height? I've had a problem with my nav div not being as tall as my content div and everyone has been telling me to do things like "negative content margins" and repeating backgrounds, but when I tested the height (i.e. 700px), everything seemed ok.
No one could really tell me why height is a bad thing.
Olivier2008-01-17T06:16:51Z
Favorite Answer
There's nothing wrong in using the "height" property of CSS on your div. Maybe they meant not to use the "height" attribute of the div like so:
<div height="700">content</div>
This is not W3C-compliant. However using the CSS property is totally W3C-compliant and valid. Like so:
If it works for you, then great, use it. Be sure to test in IE6, IE7 and FireFox. I've tried using it in nested divs and had a lot of issues with vertical positioning between the 2 browsers. It just seemed to be supported differently depending on the browser. One thing to be aware of, the div will grow in height if more content is added. You can use max-height for FireFox to force a height, but this isn't supported in IE.