Creating a flexible centred div in IE6

Creating a div in Freeway that is 10% in from the left of the page, and 10% in right of the page is easy to create.

In IE7 its OK and displays correctly.

In IE6 the div width collapses to zero width (if there in no content). Or collapses to the width of the divs content. (But does stays 10% in from the left).

Is there any way to help IE6 display this correctly (and don’t say use Firefox) :wink:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 7/3/08 (at 11:06 -0500) WebWorker said:

Creating a div in Freeway that is 10% in from the left of the
page, and 10% in right of the page is easy to create.

In IE7 its OK and displays correctly.

In IE6 the div width collapses to zero width (if there in no
content). Or collapses to the width of the divs content. (But does
stays 10% in from the left).

Arrgh!
This is very similar to a problem I had recently. I wanted to make a
div that was fixed a certain number of pixels in from the sides of
the browser window, AND would contain a QuickTime VR movie set to be
100% of its container.

This works fine in non-Microsoft browsers. The div takes its sizing
cue from the browser window, and the QTVR movie takes its sizing cue
from the div that it lives in.

But IE works differently - oh lordy, does it ever! The div takes
fright at the content it sees inside itself and tries to shrink to
fit, ignoring the instructions to scale relative to the browser
window. The movie, set to be 100% of its container, obediently
collapses, as does the div, as does the movie…

So when it is viewed in IE on Windows, the div is a zero-width,
zero-height object, with a 100%-scaled QTVR movie inside, also scaled
to zero pixels wide and tall.

Gaaaahhhh!!!

IE - in particular IE6 - is a brain-dead excuse for a browser. Nobody
should use it, ever. And you may need to use radically different
approaches to building your layout if you want that kind of design
behaviour. Sorry! :frowning:

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Off the top of my head I would say try using a Conditional stylesheet to target IE6 and adjust the CSS to address this specific problem.

Todd

On Mar 7, 2008, at 10:06 AM, WebWorker wrote:

Creating a div in Freeway that is 10% in from the left of the page, and 10% in right of the page is easy to create.

In IE7 its OK and displays correctly.

In IE6 the div width collapses to zero width (if there in no content). Or collapses to the width of the divs content. (But does stays 10% in from the left).

Is there any way to help IE6 display this correctly (and don’t say use Firefox) :wink: