Jump to content

Fixed background image


Xtazy

Recommended Posts

body { background: url('bg.png') top middle no-repeat fixed; }

The middle could be center.. but try this :)

Building on that you can specify x and y position - % or px...EG:body { background: 45px 300px no-repeat fixed url('bg.png'); }or mixbody { background: center 27px no-repeat fixed url('bg.png'); }(I think you have to put the url at the back if you're grouping the properties)http://www.w3schools.com/css/pr_background.asp
Link to comment
Share on other sites

body {background-color: #dfffdf; // set the colour for the pagebackground-image: url('images/opac_logo.gif'); // select the imagebackground-repeat: no-repeat; // no repetition of the imagebackground-attachment: fixed; // fix the image on the pagebackground-position: 50% 75%; // at this spot, play with it...}

Works for me...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...