PDA

View Full Version : Div header background img not showing in FF


bhan
02-27-2009, 10:18 AM
Hey,
I am a newbie here but i would really appreciate your help.


I have been trying to find a solution to this problem for days. I have very little experience making web pages, actually thats a lie i have no experience making webpages and i am blindly swinging in the dark trying to fix my problem. I am using dreamweaver to build the website.
In IE the images on my page in the div header and div footer backgrounds show up no problem, but in firefox they dont show up at all.
I have tried all sorts of things margins, padding, z-values...
i dont really know what im doing and i feel like there is a simple solution to this.



Below is the .css code im using.
.oneColFixCtrHdr #header {
background-color: #FCF;
background-image: url(file://///hal/Users/elanor/My%20Documents/LISSADELL%20WEB%20FEB%2025/images/Lissadell%20corn%20lilly%20by%20Pamela%20Cassidy.j pg);
background-position: 0px -36px;
background-repeat: no-repeat;
margin: 0px;
padding: 0px;
} and the .html
<!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" />
<title>Lissadell House and Gardens Sligo</title>
<link href="oneColFixCtrHdr.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #033;
}
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>

<body class="oneColFixCtrHdr" id="m1">

<div id="container">
<div id="header">
<h1>&nbsp;</h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- end #header --></div> I would really appreciate any help as i am starting to crack up!!
thanks

Corrosive
02-27-2009, 11:01 AM
This path looks a bit dodgy...

background-image: url(file://///hal/Users/elanor/My%20Documents/LISSADELL%20WEB%20FEB%2025/images/Lissadell%20corn%20lilly%20by%20Pamela%20Cassidy.j pg);

It's pointing to My Docs on your hard drive when it should be pointing to a file in your site structure

Have you defined your site correctly?

Also, you should not have spaces in file names. Use an underscore or dash if you want to break up words in file names. I.e. pamela_cassidy.jpg rather than pamela cassidy.jpg Some browsers don't like the '20%' that spaces naturally insert into your file name.

Try all of this and come back if it is still broken :)

bhan
02-27-2009, 11:08 AM
I thought that might be it but all the other images have the same paths and file names and they work. I try it though anything at this point.

Thank you.

bhan
02-27-2009, 11:25 AM
I think i got it!:) i scrapped the whole background image idea because i just couldnt get it to work. And inserted an image into the div header which worked!!

Thank you for your help

Corrosive
02-27-2009, 12:00 PM
I think i got it!:) i scrapped the whole background image idea because i just couldnt get it to work. And inserted an image into the div header which worked!!

Thank you for your help

Glad to hear it!