I wonder why div elements sometimes are zerosized while containing html layout. I want to set background-color but in vain. I use firebug to investigate layout and notice that some divs are empty.
For example this dirty HTML (attribute values are omitted by …) has div that is zerosized:
<div id="..." style="background-color:#f00; ">
<a id="..." href="javascript:void(0);" class="reportTitle"
onclick="reportClick(...)" style="float: left">...</a>
<img id="..." class="hidden" src="..." style="padding: ..."/>
</div>
What shall I do to avoid such issues?
Thank you in advance!
Similar:
- CSS layout – float:left causes mysterious vertical gap Once more the joy of trying to use pure CSS for layout has me stumped. Please consider, if you will, the following code: HTML Code:...
- CSS liquid width , min-width issue Hello forums please advice me on my liquid width layout. Basically I have two columns . Left is for navigation and right is for contents....
- Issue with 3 column fluid layout Hi I am having an issue with a 3 column layout. In the central column I have a title with a background color. It uses...
- Problems I always run into… Hey, Here are some situations where I end up adding more markup in order for it to work correctly. I’m looking for a better way...
- Text overlap in IE7 I’ve run into a really odd and intermittent problem on one of our pages while doing our table-free site redesign. On our Memorandum pages, the...
Tags: attribute, background color, div elements, divs, firebug
[...] Html: possible reasons why container div can be zero sized | The … [...]
[...] Html: possible reasons why container div can be zero sized | The … [...]
[...] Html: possible reasons why container div can be zero sized | The … [...]
[...] Html: possible reasons why container div can be zero sized | The … [...]
[...] Html: possible reasons wһу container div саח bе zero sized | Tһ&#… [...]
[...] Html: possible reasons why container div can be zero sized | The … [...]