Hi Peter, [EMAIL PROTECTED] wrote: > Hello, > > (Note: My browser versions are Firefox 1.5 and Internet Explorer 6.) >
Might want to consider upgrading to FF 2 and IE 7. Keep the old guys around for testing. > I started learning CSS a few weeks ago for a school project and I think I > understand the basics, but IE's weird behaviour keeps bugging me. > > I've managed to solve all the important issues (well, some went away > automatically, which is okay too), except for this one. (Can't give a link, > since it's still on the intra-net.) > > My site layout has a header and footer spanning the browser, height defined > in pixels, with a div I called 'main' in between. This 'main' div contains a > div called 'left' with the navigation and a div called 'content'. All of > these divs are positioned absolutely. (I used * html hacks for IE.) > Uh-oh, alarms going off: absolute positioning for layout is a very bad idea, and I'm not surprised you're having problems. > Now, this is where it becomes interesting. (I think.) > > I want my main division to have an image as background, resized to make it > fill the height (using height: 100%; width: auto;). > > I now have two divs (background and content) in my 'main' div, both > positioned absolutely, stacked right on top of eachother. > > This works, provided I nest my two divs in another div (direct sub-div of > and basically identical to 'main') to ensure that IE will handle the > percentages correctly. > Yep, sounds like typical IE bug. :-) > The html code (summary): > <div id="main"> > <div id="content-container"> > <div id="background"> > <img> > </div> > <div id="content"> > <p></p> > </div> > </div> > </div> > > That is, it works for the height. Strange things happen to the width in IE: > > - when loading (anything except refreshing, so address bar or links, even > resizing), everything is or becomes fine > - when refreshing, the image is 'squared', that is, it is distorted to form > a square with height: 100% > > The home page is a special version of this setup, without a background div > but with a 'homemade' image map consisting of several images forming one > picture. The heights are set to 55% for the first row and 45% for the > second: these images are also 'squared' on refreshing. > We really need a page to be able to see this. Can you get some free hosting and stick it up somewhere for us to look at? Thanks, Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
