Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

steady background

Status
Not open for further replies.

piramide

Programmer
May 20, 2001
4
NL
Hi!
Probeably hundreds of you people know how to make a steady backgroundpicture in the center of your webpage and with the text scrolling over it, but I can't find out how!!! I know it's probeably a stupid question but i just started using dreamweaver so please help me!

thank you,
kasper
kakend@zonnet.nl
 
Step 1:Simply insert the below code into the <body> section of your page, immediately following the <body> tag itself. Change picture.jpg to reference your own background image.

********************************************************
<script language=&quot;JavaScript1.2&quot;>
if (document.all)
document.body.style.cssText=&quot;background:white url(picture.jpg) no-repeat fixed center center&quot;
</script>
********************************************************

This script is designed to be completely cross-browser friendly. What this means is that you can by all means specify a &quot;regular&quot; background image to be used for surfers using browsers other than IE 4 to view. Just use the good old background attribute of the <body> tag to specify this alternate background image.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top