Setting a div’s height in HTML with CSS

Ahem…

The short answer to your question is that you must set the height of 100% to the body and html tag, then set the height to 100% on each div element you want to make 100% the height of the page.

Actually, 100% height will not work in most design situations – this may be short but it is not a good answer. Google “any column longest” layouts. The best way is to put the left and right cols inside a wrapper div, float the left and right cols and then float the wrapper – this makes it stretch to the height of the inner containers – then set background image on the outer wrapper. But watch for any horizontal margins on the floated elements in case you get the IE “double margin float bug”.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)