DIV height problem in IE

Pin It


box2When I was trying to create a division using DIV tag and fix a height to value below 12px in IE, the height didn’t go below about 12px in the webpage. After trying and testing a lot, I googled and found that it was minimum height bug in Internet Explorer.

There are couple of ways to fix this min-height bug:

Solution 1: Put a comment inside the div

<div style="height: 10px;><!-- --></div>

If the above solution doesn’t solve the problem then:

Solution 2: Put &nbsp; inside the div and add this to its style

div#seperator { font-size:1px;line-height:0;}

And specify the actual height using the tag

For example: if we need to set a height of 5px then

<div id="seperator" style="height:5px;">&nbsp;</div>

This it it. My problem was fixed. :)

1 comment on this postSubmit yours
  1. apart from header being collapsed and expanded ….it should also ensure that footer is fixed below and whenever i collapse the header …the body area should expand leaving the footer as fixed so that the data inside the body area gets the whole space to be viewed.
    can anyone give me solution to this problem please…???? :(

2 total pingbacks on this post
  1. Design Gala
Submit your comment

Please enter your name

Your name is required

Please enter a valid email address

An email address is required

Please enter your message

Twitter

  • May 2, 2012 04:15

    10 Free WordPress Theme To Make You Forget About Premium Theme http://t.co/YRiLCiVa

  • March 2, 2012 17:16

    3 Helpful Tools to Test Cross Browser Compatibility of Webpage http://t.co/FY0jh8Dn

  • March 2, 2012 16:43

    3 Helpful Tools to Test Cross Browser Compatibility of Webpage http://t.co/QUlYKInf #IE #FF #Chrome #Testing #CrossBrowser

  • March 2, 2012 12:52

    Top 5 Plugins to Build Contact Form for WordPress http://t.co/PWyR08Iq #WordPress #Plugins #ContactForm

  • June 11, 2011 02:49

    CSS 3 Transitions http://bit.ly/m0pK3t

Design Gala © 2012 All Rights Reserved

Designed by 76miles

Powered by WordPress

More in CSS (9 of 15 articles)
box