fry2010 Posted March 12, 2009 Share Posted March 12, 2009 I have looked around everyone for a solution so this is my last resort really. Everywhere else describes the same solution but it still fails to work. What I have is a background image reapted-x horizontally accross the very top of the page. I have placed this in the <body> tag, not in a containing div. I have tried using background: #ffffff url('.....') repeat-x top left; and also tried the long method of declaring all background rules i.e. background-image: url('....'); background-repeat: repeat-x; etc..... It shows in firefox but not in i.e. 7 I am not sure about earlier versions of i.e. as I dont have them. My page validates at w3c. I have also tried declaring a set width and height and position: relative; and position: absolute; Nothing is working. My original thought was that I shouldnt use a background image in the body tag, but i tried to put in another container and still no luck. Does anyone have any ideas on what I should try? Also I have declared a doctype at the start of every html document and it parses correctly so its not i.e. going into quirks mode. Any help appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/149142-background-wont-show-in-ie/ Share on other sites More sharing options...
fry2010 Posted March 12, 2009 Author Share Posted March 12, 2009 here is part of the css code: *, html{ margin: 0; padding: 0; } body { background-image: url(images/header_01.gif); background-repeat: repeat-x; text-align: center; } html, body { min-height: 75%; height: 75%; } and the html code (shell): <html> <head><title>TITLE</title></head> <body> <div id="wrapper"> <div id="header"> <p>Login stuff goes here and title</p> </div> <h1>SOME TEXT</h1> <p>SOME TEXT</p> <div id="footer"> <p>FOOTER</p> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/149142-background-wont-show-in-ie/#findComment-783174 Share on other sites More sharing options...
fry2010 Posted March 12, 2009 Author Share Posted March 12, 2009 Here is part view in firefox, and the second part view in i.e. version 7.0 [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/149142-background-wont-show-in-ie/#findComment-783181 Share on other sites More sharing options...
fry2010 Posted March 12, 2009 Author Share Posted March 12, 2009 Ok I have sorted it kind of now. For anyone else that comes accross a similair problem you may want to check how you set your doctype with the http-equiv tag. I was using UTF-8 encoding, changed it to the iso standard and now things are working (kind of) correctly. For some reason I have a habit of using UTF-8 as encoding I dont know why I think its because in my early days I read a book that suggested to use this. But its stil not well supported so I recommend to avoid the use of UTF-8. Also internet explorer is the biggest piece of sh*t ever made. Quote Link to comment https://forums.phpfreaks.com/topic/149142-background-wont-show-in-ie/#findComment-783185 Share on other sites More sharing options...
haku Posted March 13, 2009 Share Posted March 13, 2009 What you were doing should work fine in UTF-8. I suspect it was a problems somewhere else in your code. It may also be that your CSS document hadn't been saved in UTF-8 format. Quote Link to comment https://forums.phpfreaks.com/topic/149142-background-wont-show-in-ie/#findComment-783456 Share on other sites More sharing options...
fry2010 Posted March 13, 2009 Author Share Posted March 13, 2009 Yeah you are sort of correct on that. There was one document that wasnt actually saved as UTF-8 the rest where including my css sheet. The other problem was I wasnt sending out the doctype decleration before any other header info in the php code, except of course session_start(); which must go before anything. So it was just a bit of juggling around, but I still using ASCI not UTF-8 as its the norm on most other sites. Sorted now either way, and a few lessons learned. Quote Link to comment https://forums.phpfreaks.com/topic/149142-background-wont-show-in-ie/#findComment-784148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.