ckrudelux Posted August 13, 2009 Share Posted August 13, 2009 Why is my position fixed not at the top of the browser in IE 7, while in FF it's at the top? position: fixed;left: 0px;right: 0px;width: 100%;height: 100%;z-index: 1;background: url('pageparts/80transp.png'); Link to comment Share on other sites More sharing options...
victorlonmo@gmail.com Posted August 13, 2009 Share Posted August 13, 2009 "position: fixed;" is recognized by IE7. I have used it and it works.Have you specified the doctype in your file? For example:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">If you don't specify the doctype IE will go into "quirks mode" and "position: fixed;" is not supported by IE7 when in quirks mode. I hope that is the problem. Let me know how things work out. Floater Link to comment Share on other sites More sharing options...
ckrudelux Posted August 13, 2009 Author Share Posted August 13, 2009 "position: fixed;" is recognized by IE7. I have used it and it works.Have you specified the doctype in your file? For example:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">If you don't specify the doctype IE will go into "quirks mode" and "position: fixed;" is not supported by IE7 when in quirks mode. I hope that is the problem. Let me know how things work out. FloaterSorry but I code XHTML 1.1 so I have a doctype... I can guess it has something to do with the z-index which of some reason don't seems to have any function right now couse my box is on top over everything else even if I comment it out. Strange! Link to comment Share on other sites More sharing options...
victorlonmo@gmail.com Posted August 13, 2009 Share Posted August 13, 2009 I guess I jumped to a conclusion prematurely. -> When the only tool in the tool box is a hammer problems start to look like nails... I don't have IE7 on my machine (I do have IE tester which mimics IE7) so I can't be sure what will work and what won't. I copied your CSS and it would not display background images in the IE7 emulator or in Chrome.When the width and height properties were removed the background showed up fine provided there was something within the XHTML to give height and width to the content corresponding to the CSS. If you just want the backgrounds to be displayed then I would suggest specifying the height and width attributes in px corresponding to the size of the background image. Please let me know if it works.Floater Link to comment Share on other sites More sharing options...
ckrudelux Posted August 14, 2009 Author Share Posted August 14, 2009 I guess I jumped to a conclusion prematurely. -> When the only tool in the tool box is a hammer problems start to look like nails... I don't have IE7 on my machine (I do have IE tester which mimics IE7) so I can't be sure what will work and what won't. I copied your CSS and it would not display background images in the IE7 emulator or in Chrome.When the width and height properties were removed the background showed up fine provided there was something within the XHTML to give height and width to the content corresponding to the CSS. If you just want the backgrounds to be displayed then I would suggest specifying the height and width attributes in px corresponding to the size of the background image. Please let me know if it works.FloaterWell everything shows at my end but not about 154px below the top in IE7. I tested to change to px and it still has it 0 point 154px below 0. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.