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 1

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 designing so please help me!

thank you,
kasper
kakend@zonnet.nl
 
thanks for the fast response!
But how do I place it in the center of the opened window and not repeated?

thanks
kasper
 
well...put this in the head and take the thing I told you before out of your body tag:

Code:
<style type=&quot;text/css&quot;>
body { background-image: url(&quot;bgPic.gif&quot;); background-repeat: no-repeat; background-attachment: fixed }
</style>

This will give you a single bg image...I don't how to position a bg image, try reposting with that new question.

Good luck...

-Greg :-Q
 
...just add one more line to the CSS definition:

{background-position: top center;}

...alternatively you can specify exact coordinates of the bg image:

{background-position: 20px 40px;}

the complete syntax is as follows:

{ background-position: [percentage | length]{1,2} | [top | center | bottom] || [left | center | right]}

I hope this helped,

---
---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top