tattoos

Thursday, February 24, 2011

Fixed Height of Div

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.

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

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

No comments:

Post a Comment

 

blogger templates | Blogger