Html: possible reasons why container div can be zero sized

Tags: , , , ,
Posted in dotnet, vb, vb.net | 6 Comments »

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:

  1. 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:...
  2. 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....
  3. 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...
  4. 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...
  5. 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: , , , ,

6 Responses to “Html: possible reasons why container div can be zero sized”

  1. [...] Html: possible reasons why container div can be zero sized | The … [...]

  2. [...] Html: possible reasons why container div can be zero sized | The … [...]

  3. [...] Html: possible reasons why container div can be zero sized | The … [...]

  4. [...] Html: possible reasons why container div can be zero sized | The … [...]

  5. [...] Html: possible reasons w&#1211&#1091 container div &#1089&#1072&#1495 b&#1077 zero sized | T&#1211&#… [...]

  6. [...] Html: possible reasons why container div can be zero sized | The … [...]

Leave a Reply