Fixed background image

Status
Not open for further replies.

stalkio

New Member
Messages
45
Reaction score
0
Points
0
I have created my css for a background image in dreamweaver but am aware that it only remains in a fixed position using IE - other browsers scroll the image. How can I make Firefox and the rest keep my background image locked in position? Thanks for your suggestions.
 

tnl2k7

Banned
Messages
3,131
Reaction score
0
Points
0
I have created my css for a background image in dreamweaver but am aware that it only remains in a fixed position using IE - other browsers scroll the image. How can I make Firefox and the rest keep my background image locked in position? Thanks for your suggestions.

In your stylesheet, add 'background-attachment: fixed;' to your style code for the body. So it'll be something like:
Code:
body {
 background-image: url(path/to/picture.png);
 background-attachment: fixed;
}

Simple :).

-Luke.
 

stalkio

New Member
Messages
45
Reaction score
0
Points
0
Thanks for your quick response. Sorry I have indeed resolved it - strangely enough I had to specify 'scroll' on the css background rather than 'fixed' which seems slightly illogical but ok..works well on all browsers I think now - well definitely IE and FF = thanks again
 
Status
Not open for further replies.
Top