Are height properties depreciated in XHTML 1.0?
According to the W3schools.org website, not only the height but the width properties are depreciated in XHTML 1.0. I am not sure why width is depreciated, but I have found that height is practically a useless measurement when it comes to CSS layout.
The content will drive the height of the containers and the correct use of paddings and margins will help cure any need for the use of a set height.
I found that it will cause problems when height is used in a CSS block container this weekend actually. My sidebar with the links and such was getting truncated after I switched my homepage into the archives. Turns out, my new blog entry wasn’t as long as the previous month of September, so I hadn’t noticed that the site was getting truncated in Mozilla browsers. This was because I had a height of 400 pixels set for my sidebar.
After taking out an absolute height, the content container resized the content and allowed the “clear” block element to extend the background down the height of the page, fixing the truncation problem.
Here are some similar arcade posts
- Why can’t I set the table height attribute to 100%
- Empty div containers will cause a break without a comment in them.
- How to use float to get a gallery of thumbnails to evenly space each other.
- How do I turn the visibility off on a layer (div block)?
- Design your own CSS website Part 1: The Wrapper
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.











Comments
No comments yet.
Leave a comment