PDA

View Full Version : Width in IE


Zozart
10-05-2003, 20:38
Okay, the width property defines the width of an element such as a div, table, paragraph, etc, right?

And using a percentage value, tells that element to be that particular width depending on its parent element, right?

So tell me, why does IE (6.0) have a problem with width percentage when using divs?

Problem - On my site, www.zyon.org. I decided to weave the forum directly into the main display (content area). So I did it (very easily thanks to the css layout), and it apparently works perfectly fine in Gecko and Opera, since the width of the forum body is 100%, and Gecko and Opera both see that as 100% of it's parent element, which in this case, is the content div.

So I check it out in IE, and guess what, IE doesn't realise that it has to be 100% of the parent element which is the div, and instead acts as though it's parent element is the page body, which leads to unsightly results in the most popular browser. Not good, any ideas?

Link - http://www.zyon.org/forum

Thanks :) :confused:

AlastairM
10-05-2003, 20:52
add 'width:100%' to your #textcontent css, you need to explicitly define a width for IE to play nicely

cheers

alastair

Zozart
10-05-2003, 20:59
Thanks, it worked, but the 100% affects all other pages making them look awful :\