Scrolling content only?

aka Rohan's picture

He has: 200 posts

Joined: Feb 2006

How do you make it so that the content in the middle of a site scrolls but the side stay in position (Like Megan has done with her ZenGarden entry here)?

Smiling

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

That's just a big fixed background. In CSS you just put in background-attachment: fixed. Here's a handy reference for all the possible background properties:

http://www.w3schools.com/css/css_reference.asp#background

aka Rohan's picture

He has: 200 posts

Joined: Feb 2006

Ah ok cool, thanks Megan. So I take it you have to ensure that the background is large enough fit high resolutions (like 1600x1200) or it's not going to fill the screen? Smiling

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Yes, that background is really wide. It will run out on really large screens and then the background colour will show through (fine with me - can't be too many people in that situation anyhow).

aka Rohan's picture

He has: 200 posts

Joined: Feb 2006

Roger that. Thanks again Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.