Forum Moderators: open

Message Too Old, No Replies

fixed background in firefox

fixed background in firefox

         

jimmythesaint

8:09 am on Aug 4, 2007 (gmt 0)

10+ Year Member



I'm new to HTML and could use a little help.

I'm after a fixed background in a help file I'm writing. Using the code below it works fine in IE.

<body bgproperties="fixed" background="helpback.jpg">

but viewing the same page in Firefox the background scrolls :(

If anyone could help it would make my year. Well OK it wouldn't but your help would be appreciated.

encyclo

7:37 pm on Aug 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld jimmythesaint! :) The attribute
bgproperties
is IE-specific, and is not the recommended method. You should be using CSS as a cross-browser method for adding a background image. If you already have a stylesheet, add the following:

body {
color:#000;
background:#fff url(helpback.jpg) repeat-x fixed top left;
}

Or you can add the rule to the

body
element with a
style
attribute:

<body style="background:#fff url(helpback.jpg) repeat-x fixed top left;">

jimmythesaint

3:57 pm on Aug 5, 2007 (gmt 0)

10+ Year Member



Thanks for the welcome and thanks for solving my problem. I now have a fixed background in Firefox.