Link to home
Start Free TrialLog in
Avatar of EMB01
EMB01Flag for United States of America

asked on

No Background in FireFox, Works Well in IE

The attached code works in IE but not Firefox.

I even tried adding the following but it still won't work:

background-attachment:fixed;
height: 100%;
width: 100%;
<!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>
<title>untitled
</title>
<style type="text/css">

/* image background style */

html, body { height: 100%; width: 100%; background-attachment:fixed; background-image: url('C://Documents and Settings/Administrator/My Documents/My Pictures/snow-mountain-wallpapers_22126_1440x900.jpg'); background-repeat: no-repeat; }

</style>

</head>
<body>
Hello
</body>
</html>

Open in new window

Avatar of Ali Kayahan
Ali Kayahan
Flag of Türkiye image

Can you please try this one, absolute path with spaces wont work in web also
<!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>
<title>untitled
</title>
<style type="text/css">

/* image background style */

html, body { height: 100%; width: 100%; background-attachment:fixed; background-image: url('Pictures/snow-mountain-wallpapers_22126_1440x900.jpg'); background-repeat: no-repeat; }

</style>

</head>
<body>
Hello
</body>
</html>

Open in new window

Avatar of EMB01

ASKER

Sorry, that doesn't work.
where is your background picture (snow-mountain-wallpapers_22126_1440x900.jpg) ? Is there a link to this page ?
ASKER CERTIFIED SOLUTION
Avatar of remorina
remorina
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lordrt
lordrt

else if you want to use path, it should be the site's path instead of the drive path, like for example
background-image: url ('http://www.mysite.com/files/image.jpg'), but yet again the image must be found in the folder containing the css + other files on the server
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EMB01

ASKER

Thanks, I could put it on the desktop alternatively but I was just wondering why it wouldn't work as is.  I've never used the file:// protocol before...  interesting.