Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm attempting to modify the latest version of the mystique theme, and would like to have it so when I select a background, the page will lock that background into page, but have the content scroll over top of it. Currently the content scrolls, but the background scrolls with it, leaving an awkward spot where the background no longer exists.

Would anyone know how this effect could be done?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I think you're looking for css's fixed background: W3 background definition

Here's an example from W3.

Something like this in CSS should work:

background: transparent url(images/bg.jpg) no-repeat fixed;

And if you want the background stretch/scale 100% width and height of user's screen, you should check some examples in here. See SolidSmile responde here.

share|improve this answer

If you use a tool like Firebug you can easily figure out which element the background styles are applied to. Then if you have access to (and know how to edit) the theme's stylesheet, you can find that CSS selector and declare background-position: fixed;

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.