50 comments
Comment from: Zoffix Znet [Visitor]  
Zoffix Znet

The issue is caused by hasLayout, read my article on http://zoffix.com/css/ie/haslayout.shtml

12/26/06 @ 08:57
Comment from: dario [Visitor]  
dario

Try to set only height (or width): 100%;
It worked with me.

08/16/07 @ 16:03
Comment from: Isaac Grover [Visitor]  
Isaac Grover

Thanks to dario for the width: 100% tip. Worked like a charm for me too.

09/10/07 @ 05:16
Comment from: fe kaylius [Visitor]  
fe kaylius

you rock, i like the hacks, so i used the word-wrap method, perfecto!

10/25/07 @ 22:44
Comment from: Ben Dappen [Visitor]
Ben Dappen

Setting overflow:hidden and height:100% fixed the problem beautifully. One would think that without a set height, the parent would automatically fit the content instead of presuming height:0… I’ll be glad when IE6 usage is low enough that I can start ignoring it.

03/14/08 @ 16:23
Comment from: Simon [Visitor]
Simon

This doesn’t seem to work for me, tried the height and width at 100% and its still not playing, if you click on any of the top categories in ie6 you see what I mean. Or maybe I’m doing something wrong.

#blockdiv {
clear:none;
display:table;
overflow:hidden;
height:188px;
width: 147px;
}

04/09/08 @ 11:09
Comment from: Romain [Visitor]
Romain

Thank you for this nice tip ;-)

For me, I had to put a div with height and width to 100% in the first div for this to work.

04/10/08 @ 10:24
Comment from: Neil Pharazyn [Visitor]  
Neil Pharazyn

I ran the following using IE6. The code version I run contains a couple of pages of content. It displays and prints the lot despite your suggested height: 100% and overflow:hidden;

I only want to see\print half a page of content. What do I add\change to achieve that?

#wrapper {
height: 100% /* again, fill in value needed */
overflow:hidden;
border: 3px solid; /* this is just for debugging, to see if the
browser actually does something sane */
}

….a couple of pages of content

04/11/08 @ 07:10
Comment from: Acronyms [Visitor]
Acronyms

Neil, You need to add “;” to height: 100%

04/22/08 @ 10:14
Comment from: Natasha [Visitor]
Natasha

nice
I have found two interesting sources http://fileshunt.com and http://filesfinds.com and would like to give the benefit of my experience to you.

05/16/08 @ 15:53
Comment from: Clotho [Visitor]
Clotho

The fixed height solution works for me, but fixing width does not help. Other solution does not help too.

Finally I create a new div with the fixed height and width to enclose the element,

05/19/08 @ 11:11
Comment from: Rajiv [Visitor]
Rajiv

Overflow solutions behaves differently in the sub-version of the IE6. There may not be a generic solution to this.

07/17/08 @ 19:10
Comment from: Drewe [Visitor]
Drewe

I managed to fix this by setting a postion property.

So if you don’t want things to change simply use position:relative;

03/02/09 @ 05:10
Comment from: Leslie R [Visitor]
Leslie R

I’ve been struggling with only showing part of a large image in an A tag. IE would show the entire image, setting overflow did nothing even though my width was set. Overflow did work when set on the parent LI, but this would then hide my flyout menus.

I added the fix mentioned above - position: relative; and now the A tag behaves in IE.

Thank you for that solution!

05/27/09 @ 17:45
Comment from: Kelly [Visitor]
Kelly

Thank you so much for posting the solution to this IE6 bug. I’m working on a deadline and your solution fixed the problem and got me back on track quickly.

07/22/09 @ 21:32
Comment from: Lisa [Visitor]
Lisa

Thank you Drewe! I had the height and width already set, but it was the position relative that I was missing! I was getting frustrated, thank you!

08/03/09 @ 17:36
Comment from: driedoezoe [Visitor]
driedoezoe

THANKS!!!

08/06/09 @ 16:41
Comment from: ced [Visitor]
ced

great with position:relative !

08/12/09 @ 11:45
Comment from: Mahmoud Ameara [Visitor]
Mahmoud Ameara

I do the height 100% and overflow but it expand the height of the page show the scroll :(

08/13/09 @ 11:24
Comment from: Kamal [Visitor]
Kamal

thanks Leslie R! great fix with position:relative!

09/21/09 @ 15:41
Comment from: sathish [Visitor]
sathish

Thanks dario, height:100% has fixed my problem,
height: auto is differs from other browsers and IE6.
Good solution Thanks,

09/26/09 @ 14:13
Comment from: Merel Veracx [Visitor]
Merel Veracx

Yes, adding position: relative to the surrounding box with the overflow: hidden did the trick - now my images are cropped in IE7. Thanks!

09/26/09 @ 20:17
Comment from: Tony [Visitor]
Tony

This worked for me also when I applied the line

overflow:hidden;

In the following code

background-color:#fafafa;
margin:1em 10%;
min-width:60em;
position:absolute;
width:80%;
overflow:hidden;
}

10/05/09 @ 14:27
Comment from: Donald [Visitor]
Donald

The postion:relative helped me with my issue.

10/08/09 @ 22:06
Comment from: Szilard David [Visitor]
Szilard David

Thanks!! Applying a fixed width to the same container as the overflow property worked for me

12/16/09 @ 16:03
Comment from: Amit Sharma [Visitor]
Amit Sharma

Thanks !!
Fixed by position:relative;

01/18/10 @ 06:13
Comment from: ken [Visitor]  
ken

the only thing fixing my problem was working with position:relative;

it’s a kind of non sense applying height:100% for an element with a fixed height, so it doesn’t work for me.

the fixed height and width, without relative positioning didn’t work either. Thanks anyway! :)

02/22/10 @ 15:12
Comment from: subduedjoy [Visitor]
subduedjoy

You’d think MS would have this solved by IE 8. Nope. Setting height did not work for me. Setting width to 100% did. Thanks!

03/11/10 @ 21:14
Comment from: Wojtek [Visitor]
Wojtek

@Donald.

THANKS! The position relative worked great for me too!.

03/16/10 @ 18:29
Comment from: Rob Crowell [Visitor]
Rob Crowell

You, sir, have just ended about 2 hours of frustration on my end. Kudos!

05/18/10 @ 09:52
Comment from: masoud [Visitor]
masoud

THANKS alot!
position:relative;

05/27/10 @ 14:42
Comment from: Dominik [Visitor]
Dominik

Thanks mean! It’s work very well. Have a nice day!

09/21/10 @ 12:12
Comment from: Matt [Visitor]
Matt

Thanks very much! This is exactly what I was looking for … works without the hack in IE8, but IE7 was not behaving.

11/22/10 @ 02:13
Comment from: Fredde [Visitor]
Fredde

Thanks! Saved my day! :D

12/01/10 @ 14:37
Comment from: وظائف شاغرة [Visitor]
وظائف شاغرة

you saved my day :)
thanks

01/09/11 @ 15:51
Comment from: rollo [Visitor]
rollo

thanx so much! works fine!

01/27/11 @ 03:31
Comment from: Fpixl [Visitor]
Fpixl

Thanks for your tip!
Adding height: 100%; worked for me

:)

02/15/11 @ 11:21
Comment from: Craig [Visitor]
Craig

This is a great IE6 fix. I was floating some spans inside an anchor and using overflow:hidden; fixed the bug perfectomondo.

Cheers

03/01/11 @ 16:04
Comment from: Digital Friend [Visitor]
Digital Friend

Thank you, I have been trying to make a site IE6 compatible for the last few days and is proving a pain. your tips helped me lots! Thanks

06/09/11 @ 15:16
Comment from: Monique [Visitor]
Monique

position: relative;

it worked for me.
thanks!

06/18/11 @ 09:56
Comment from: Ricky [Visitor]
Ricky

thank you! you help me a lot, good job brother!

08/01/11 @ 12:21
Comment from: Sergey Sagan [Visitor]
Sergey Sagan

position: relative; Also fixed the bug for me in Chrome, now it hides all of the elements! Thanks for the tip!

10/15/11 @ 13:09
Comment from: Robin [Visitor]
Robin

Position: relative; did the trick!

10/24/11 @ 18:31
Comment from: irina [Visitor]
irina

adding :

position: relative;

to the element worked for me

01/19/12 @ 14:13
Comment from: karen keith [Visitor]
karen keith

this helped me out a lot! Thank you so much :)

02/26/12 @ 06:01
Comment from: s-now [Visitor]
s-now

Thanks ! The width:100%; worked for me :-)

03/30/12 @ 11:32
Comment from: Abdul [Visitor]  
Abdul

Height:100%; fixed IE8 issue but now in Firefox it’s not showing scroll.

08/06/12 @ 22:49
Comment from: Siscolor [Visitor]
Siscolor

Thanks ! The width:100%; worked for me :-)

09/26/12 @ 18:31
Comment from: Jacques Lederer [Visitor]
Jacques Lederer

Thanks a lot! I have been struggling with this. It didn’t seem to work for me, until I realized you must also apply “overfow:hidden” to the containing div. Not only “fixed” height. That solves the added unwanted scroll problem of IE. (For me at least)

01/27/13 @ 12:14
Comment from: yana [Visitor]
yana

Thanks !

03/21/13 @ 09:25