Non Scrolling background in websites

Started by Memor-X, March 18, 2012, 05:46:32 am

Previous topic - Next topic

Memor-X

there are a number of sites (particularly WordPress Blogs) that have you scroll down the page yet the background remains still, i've been, for a while, trying to get my head around the dam thing trying to pull it off myself, i've downloaded the pages and looked at the code, searching google and even trying to pull apart my Wordpress installation which i use as a work dairy but i can't find anything.....but i'm not sure what i'm looking for anyway, i see a bit of code and copy it into a test page to see if it works and so far nothing

since i'm just waiting for ARCed to be done so i can start using the map zoom to clean up my cutscenes i've been trying to fix up Pandora Net, i've got the PHP framework done and a login form ready to use but i need to finalize the design and what i would like to do is fix up a background where i have Pandora on the side and just stay there when you scroll

so how can i do this? do i need some Java library or something to pull it off are is it to do with CSS (i would kill myself if it's CSS to miss it this god dam long)

ShadowPierce

That's easy, just add the bgproperties="fixed" attribute to your <body> tag in your HTML file and you're done... ;)

You're freakin' welcome... :3

Spoiler: ShowHide
Quote from: Blizzard on February 16, 2011, 03:44:48 pmThere you go. It's the proof that SDK is crap. It's incompatible with itself.
3DS Friend Code: ShowHide
1161-0627-9890

Memor-X

*pull's trigger on gun......remember's that it's a water gun that looks like a real one*

thanks for that

Aqua

http://www.w3schools.com/  is a very helpful resource for things like this.

http://www.w3schools.com/cssref/pr_background-attachment.asp
This page tells you how to achieve what you want via CSS.
background-attachment: fixed;

G_G

Another great thing about w3schools is they actually show you the examples visually and allow you to edit them on the spot.

Memor-X

Quote from: Aqua on March 18, 2012, 08:29:06 am
http://www.w3schools.com/  is a very helpful resource for things like this.

http://www.w3schools.com/cssref/pr_background-attachment.asp
This page tells you how to achieve what you want via CSS.
background-attachment: fixed;



*repeatedly smashes head against wall* no wonder i couldn't find it, i was searching for static or non scrolling background when i searched W3Schools, i mainly use it for PHP reference because my search results for PHP seems to work better