PDA

View Full Version : Fixed position - Problem with I.E.



laertjansen
September 9th, 2008, 09:24 AM
Hello everyone,

I´ve got a problem here. I´m working on my website http://www.laertjansen.com/test/
and applied a fixed position to the top div but it is working very well only with Firefox. It´s completely messed in I.E. 6 and 7. Since I´m not an expert in Html or css I´m looking for some help to fix it. Does anyone know where´s my mistake?

Thanks a lot in advance.

DDD
September 9th, 2008, 09:50 AM
Use position:absolute;

You may have to set your body atributes as follows to get it to work
height:100%;
overflow-y:auto;

Although IE7 should not have a issue with the fixed positioning. But as a rule I try to steer clear fixed positioning. But that may change when IE 8 comes out.

tfg
September 9th, 2008, 10:05 AM
position: absolute is not the answer to what the OP is after. that wouldn't allow the header information to scroll down the page.

ie7 collapses the top header area meaning the overlaid content appears on top of the 1st graphic instead of respecting the margins applied. thus the margin should be substituted for padding in ie only.

my 1st thought is to include a conditional comment in your html


<!--[if IE]>
<style type="text/css">

#folio {
padding-top: 132px;
}

</style>
<![endif]-->

fasterthanlight™
September 9th, 2008, 10:56 AM
http://www.doxdesk.com/software/js/fixed.html

always use padding instead of margin if you can help it

Templarian
September 9th, 2008, 11:30 AM
:love:

DDD
September 9th, 2008, 11:55 AM
hmmm I guess I didnt understand his issue. Actually I still dont. But my advice stands dont use fixed :P