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
Print This Post Print This Post

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

(required)

(required)