Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > IE6 and Height: 100%

IE6 and Height: 100%
Thread Tools
Mac Elite
Join Date: Sep 2000
Location: Canada
Status: Offline
Reply With Quote
May 2, 2006, 03:31 AM
 
So, I'm fixing all of the rendering bugs that inevitably show up in IE, but I can't seem to fix the last one. In a nutshell, I have a container div with relatively positioned divs inside for content.

Within the container div, I have an absolutely positioned div running down the side of the relatively positioned divs. The absolutely positioned div has a height of 100%, which renders properly in standards-compliant browsers (the absolute div has a height of 100% of the height of the container div, so that it runs alongside all of the content divs).

Well, in IE6, the absolute div is, instead, given a height of 100% of the viewport, which leaves empty space alongside the content divs if they run below the line.

How can I get IE6 to size the absolute div to 100% of its parent block, the container div? I'd rather not resort to fixed positioning quite yet.
     
Moderator
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
May 2, 2006, 10:31 AM
 
The only way that I know how to do that in IE6 is to make the containing div relatively positioned, and the ‘inside’ div absolutely positioned. In other words, if you specify relative positioning for your container div, it should work in IE6 as well. Note the “should”.
     
dtriska  (op)
Mac Elite
Join Date: Sep 2000
Location: Canada
Status: Offline
Reply With Quote
May 2, 2006, 09:04 PM
 
Yeah, the container div is already relatively positioned.

The weird thing is that in IE5, the absolutely positioned div is correctly rendered with a height of 100% of the container div. But not in IE6.

If it matters, I'm using HTML 4 Strict. My pages validate, and the dtd does trigger IE6's standards rendering mode.

Thanks for your help.
     
dtriska  (op)
Mac Elite
Join Date: Sep 2000
Location: Canada
Status: Offline
Reply With Quote
May 2, 2006, 09:15 PM
 
Okay, this is odd. Even though Microsoft states that min-height works only in tables, applying "min-height: 100%" to the absolutely positioned div gets IE6 to correctly render the div with a height of 100% of the container div.

And, no, I'm not using tables.

Whatever, eh?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:47 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2