Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-18-2002, 02:18 AM   PM User | #1
Kenneth2k
New to the CF scene

 
Join Date: Nov 2002
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Kenneth2k is an unknown quantity at this point
Please help

I'm looking for javascript that when I you scroll the bar, everything will move, but the background stay still. Can I have that script, plz. Thanks
Kenneth2k is offline   Reply With Quote
Old 11-18-2002, 09:39 AM   PM User | #2
MCookie
Regular Coder

 
Join Date: Jun 2002
Location: NL
Posts: 421
Thanks: 0
Thanked 0 Times in 0 Posts
MCookie is an unknown quantity at this point
Hi,
You don't need JavaScript to do that but CSS.
Here's a link: http://www.devguru.com/Technologies/...css_index.html
And some code:

<html>
<head>
<title></title>
<style type="text/css">
<!--
body {
background-color:#cccccc;
background-image:url("clouds.gif");
background-attachment:fixed;
}
-->
</style>
</head>
<body>

</body>
</html>
MCookie is offline   Reply With Quote
Old 11-18-2002, 12:22 PM   PM User | #3
duniyadnd
Regular Coder

 
Join Date: Jun 2002
Location: Depends on the time of year
Posts: 478
Thanks: 0
Thanked 0 Times in 0 Posts
duniyadnd is an unknown quantity at this point
you can adjust your body tag as well:

<body background="name_of_image" bgproperties="fixed">

Duniyadnd
duniyadnd is offline   Reply With Quote
Old 11-18-2002, 01:18 PM   PM User | #4
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Deprecated...

The "background" attribute from the body element is deprecated in the more recent versions of (X)HTML, the "bgproperties" attribute isn't even in the standard, not in HTML 4.01 anyway; the CSS solution therefore is the preferred method.
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:47 AM.


Advertisement
Log in to turn off these ads.