...

View Full Version : Resolved IE Hack for sizing elements with position



Time Sheep
02-15-2012, 11:57 AM
Solution: Set a doctype (XHTML 1.0 Strict works for sure)

I am working up a fine little website.
The layout is not using the documents actual flow, but is just positioning the different elements from the CSS.
Here's an example:

<div id="content" class="flexcroll"><h1>Testing header</h1>Lorem ipsum dolor sit amet</div>

#content{
padding:10px 10px 10px 10px;
border:1px solid #000;
position:absolute;
height:auto;
width:auto;
left:250px;
right:15px;
top:110px;
bottom:30px;
background:url(images/panebg.png) repeat;
overflow:scroll;
}
Of course Internet Explorer is stubborn as always, and decides not to size the elements when both a left AND right position is given. What can I do here to make it all look as it should?
Take a look here if you want to see how it looks in the different browsers:
http://browsershots.org/http://zeroyear.net/skoleside/

SB65
02-15-2012, 12:17 PM
You need a doctype (http://www.alistapart.com/articles/doctype/). IE will not behave without one. Try that for starters.

Time Sheep
02-15-2012, 12:28 PM
I did not include that? -.-
Must've forgotten. It works after setting the doctype to XHTML 1.0 Strict. Thanks :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum