Forum Moderators: not2easy

Message Too Old, No Replies

Fixed position not working in IE8

         

jons11

10:15 am on Aug 10, 2009 (gmt 0)

10+ Year Member



I tried to use the the position:fixed attribute however it only works in FF. I have read that only IE 7 and 8 support fixed positioning but it is still not working for me even in IE 7 and 8.
My code is valid CSS and HTML

This is a example of my code
#menuFrame {
position:fixed;
left:0px;
width:150px;
height:100%;
top:0px;
z-index:-1;
}

Does anybody know why my code isnt working?

Marshall

3:09 pm on Aug 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



From reading your code, I don't see a problem. I have a similar code for a site I just finished with a fixed image. However, IE8 has been causing me a lot of problems with existing sites, and probably others too. I found a simple solution: put this tag in the <head> -

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

This is even recommended by MS. Not sure if it will resolve your problem, but it can't hurt.

Marshall

jons11

9:43 am on Aug 11, 2009 (gmt 0)

10+ Year Member



I found out my problem
My doctype was
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.1 Transitional//EN">
but had to change it to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">