Jump to content

Background wont show in I.E.


fry2010

Recommended Posts

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.

 

Link to comment
Share on other sites

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>

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.