Jump to content

CSS Background URL in Firefox


dannyo101

Recommended Posts

I'm having a lot of issues displaying a background image in Firefox (I'm using version 3.5.2).  Firefox is reading the CSS file but it is not locating the image to use for the background. 

 

I've been at this for a while now so I created a very simple html page to test this.  Here is the code I have to test this.

 

Here is the CSS:

body {
background: url(../images/sample.jpg) repeat-x #005367;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

 

Here is my HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>test version</title>

<link rel="stylesheet" href="styles/jj_test.css" type="text/css">

</head>
<body>

<div id="master">this is a test</div>

</body>
</html>

 

I've also tried various paths in the CSS file, including the full path but I can't get the image to display in Firefox.  The page works fine in IE and Chrome - http://dananddonna.com/joedicke/jj/

 

Any help would be appreciated.  I realize I'm probably missing something very obvious but I'm just not seeing it.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/172054-css-background-url-in-firefox/
Share on other sites

if worst comes to worst, you can set each background element separate

 

body {
   background-image: url(../images/sample.jpg);
   background-repeat: repeat-x;
   background-color: #005367;
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.