Welcome to WebmasterWorld Guest from 54.226.209.162

Forum Moderators: not2easy

Message Too Old, No Replies

IE6 and Overflow

Stop IE6 from resizing block to fit content

     
7:24 pm on Feb 5, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 30, 2002
posts:100
votes: 0


Is there a way to stop IE6 from resizing a containing block to the size of the content when the text size is increased? I would prefer the content was not clipped as with overflow: hidden, but rather appeared outside the containing block.

Failing that, is there a way I could specify overflow: hidden ONLY for IE6?

11:45 am on Feb 6, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


Are you limiting the size of the container in CSS? If you are using em's or ex's then the dimensions will naturally increase as the font-size increases.

If you are limiting the size in px (a fixed dimension) for instance, then according to the W3C spec you should be able to use overflow:visible to do what you require. This should limit the size of the container to what you have defined in your CSS, but allow the contents to spill out (visible). HOWEVER, this does not work in IE6 (ok, in IE7 Strict and all other browsers).

To specify overflow:hidden for IE6 only then consider using conditional comments [webmasterworld.com] to include an 'IE6 Only' stylesheet. Such as:

<!--[if IE 6]> 
<link rel="stylesheet" type="text/css" href="ie6only.css">
<![endif]-->
9:04 pm on Feb 6, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 30, 2002
posts:100
votes: 0


Thanks Penders. That is EXACTLY what I had ended up doing. It's a shame overflow: visible doesn't work like it should in IE6. Good riddance when it's gone in four more years :P
9:41 pm on Feb 6, 2008 (gmt 0)

New User

5+ Year Member

joined:July 9, 2007
posts: 11
votes: 0


Thanks for this. I was looking for the same answer.
11:44 pm on Feb 6, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


You're both welcome. Just to add, regarding
overflow:visible
, IE6 will expand the container to make the contents fit. So yes, it is visible, but the container is not restricted as it should be - the contents no longer overflows; it is contained!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members