Picnic Website Code Tutorials

How To Prevent IE6 From Expanding To Fit Tutorial

Here is a working example.

IE6 will not honor the dimensions of a box if what's inside the box exceeds its own dimensions. IE6 will simply expand the box to fit whatever is inside. This is different from all other browsers. However, there is a way to fix it! When and/or where would you need to use something like this? I don't have any idea - but I'm sure it will come in handy sometime!

The CSS

* html div {
overflow:hidden;
}
* html p {
position:relative;
}
		

The html

<div>
<p>TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</p>
</div>
		

Sponsors

Top Donators

Friends of Mine