Click to See Complete Forum and Search --> : scroll over a background picture


domuk
05-22-2003, 01:41 AM
Please please could someone out there tell this novice how to make your web page content (test and jpgs) scroll over a background picture (whilst the background jpg remains fixed).

Thanks,

dom.

AdamGundry
05-22-2003, 02:58 AM
Use this CSS:
background-attachment: fixed;

Bear in mind this can give some odd-looking (and disorientating) results if the background does not move as expected.

Adam

Asch
05-22-2003, 03:01 AM
That should make it !

if (document.all||document.getElementById)
document.body.style.background="url('YourIMAGE.jpg') white center no-repeat fixed"

cheers

asch

:D

AdamGundry
05-22-2003, 03:28 AM
May I ask, why are you using Javascript for this when it can be done with pure CSS?

Adam

Asch
05-22-2003, 04:31 AM
shure...because my javascript knowledge is much better then my css...

and i ve never really use css..only for basic stuff...like border bacg, text or stuff like ...I don t know many commands...

but it seems to , that sometimes, it's easyer :O)

asch

domuk
05-22-2003, 08:48 AM
Thanks Adam and Asch,

I have very little experience of HTML and javascript (3 days), however have used C and pascal in the past.

I tend to learn by example and am grappling with syntax rules and structure at present.

Is there a list of commands and what they do on the net?

Also what is the best editing tool for html?

Thanks,

Dom.

AdamGundry
05-22-2003, 12:44 PM
Check out the W3C for the best references:
Main site - http://www.w3.org/
HTML - http://www.w3.org/TR/html4/
CSS - http://www.w3.org/TR/REC-CSS2/

I tend to edit my HTML in Notepad, but if you are starting I think a good WYSIWYG editor like Composer (comes with Netscape and Mozilla) is best.

Adam

pyro
05-22-2003, 12:47 PM
And, for javascript, a good place to look would be http://developer.netscape.com/docs/manuals/javascript.html

domuk
05-22-2003, 04:30 PM
Thank's all for your help..

I am using wordpad.

I wish i could step through the scripts to gain a better understanding. (as in pascal and c compilers)

I know that this language is different, but the java is very much like C....


Thank's again,

kind regards,

Dom........


Keep up the good work!!!!!!!:)

Asch
05-23-2003, 02:02 AM
you shouldent use wordpad....

use an html editor like Webexprt 5 which is my favorit...

it s much easyer to build web pages with it....caus you have tons of shortcuts and stuff like that...presentation is nicer...you can also debug..(doesnt work perfect but still ... )


asch
:D

pyro
05-23-2003, 06:54 AM
Originally posted by Asch
you shouldent use wordpad....I don't think it's a matter of should or shouldn't, but rather preference...