Google
 
Web 9mmfilm.com

News & Views

Friday, October 28, 2005

IE empty div height problem.

I am working on a design at the moment in which I use empty divs to contain design elements through the use of css background images. It's not the best solution code wise, but it works and if used sparingly, it won't have any massive negative implications.

However I was scratching my head when I had some empty divs with a height of 6 pixels specified. Fine in Firefox, fine in Opera, NOT fine in ie. The heights were way more than 6 pixels.

Luckily I found the solution to the empty div ie problem in two seconds using Google!

The solutions given were as follows (I used method 2):

1) Put a comment inside the div:

2) Put   inside the div and add this to its style: font-size:1px;
line-height:0.

by frankp - 5:30 PM

6 Comments:


Anonymous said...

thank you for this...

I hate IE

STuFF

Anonymous said...

yes, thank you!

frankp said...

:)

Marshy Mum said...

I just came across this problem, thanks for offering the solution - the first didn't work for me but the second did.

Anonymous said...

Please don't hate IE.
Every browser has its short and/long comings.

karabas said...

thanks!

Post a comment

<< Home

Website Picks:

BifSniff Cartoons

bifsniff.com go there

Previous Posts

Animation picks:

We're Going Sailing

We're Going Sailing infoview

Crimescene

CrimeScene info view

Subscribe to Frankp's 9mmfilm blog using his XML feed. What's all this about subscribing?


Powered by Blogger

Irish Bloggers

Irish Blogs