how to have fixed height of div? I have 300px height of div, but it show 0px height when there is no content in the div.

Div doesn't have height attribute, so you cannot write <div height="400px">.

You must use css to assign the height of div. For example, <div style="height:400px;">

Posted by Zac1987 on 25 February, 2011


Enter your email address:

Subscribe in a reader

Follow zac1987 on Twitter

Chatting Box


If you feel my website is informative and it is useful for you, please donate some money to support me or buy me a drink. I will continues this good works. Thank you.