Jump to content

Position


ckrudelux
 Share

Recommended Posts

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

"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

"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
Sorry 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

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

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
Well 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...