brettsky07
asked on
CSS Body Background Image Only Works in Firefox
Hi Experts,
I noticed that my body background image is not showing up in Internet Explorer. It works fine in FF but also does not appear in Chrome... The strange thing is I have other background images on the site coded exactly the same and they all work fine in all browsers so I know it is pathed correctly. Any suggestions??
I noticed that my body background image is not showing up in Internet Explorer. It works fine in FF but also does not appear in Chrome... The strange thing is I have other background images on the site coded exactly the same and they all work fine in all browsers so I know it is pathed correctly. Any suggestions??
html, body {
height: 100%; width: 100%;
padding: 0; margin: 0;
}
body{
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
background-image: url(../images/bg.jpg);
background-repeat: repeat-x;
color: #333;
}
Try to empty the browser cache of the other browsers and reload the page.
ASKER
I have... I have also tried it on multiple machines... no luck. I've also tried using different images.
I tested your code on IE and Chrome and it just worked. I think the problem is in the other code. Could you give me all the code?
ASKER
The project hasn't launched yet so I cant upload all the code.... its a php file header:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
It could very well be something in my css overriding it but I cant seem to figure it out...
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
It could very well be something in my css overriding it but I cant seem to figure it out...
Char by char - check if this is exactly the same syntax as in the other cases for including the images, also try to put " around the path
background-image: url("../images/bg.jpg");
background-image: url("../images/bg.jpg");
Is your image path in the correct location ? I mean you are using style sheet inside a folder css and that means your images folder should be there in your root so you are using "../images/bg.jpg". So check your image path and I think it's better post your css code and index page code so that can check.
background-image: url(../images/bg.jpg);
background-repeat: repeat-x;
hi
i have created a demo page to resolve your issues, please see attachment and let me know if this is not work for you.
regards
deepak
bg-image.zip
i have created a demo page to resolve your issues, please see attachment and let me know if this is not work for you.
regards
deepak
bg-image.zip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
File error.