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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I set fixed background image 1

Status
Not open for further replies.

southbeach

Programmer
Joined
Jan 22, 2008
Messages
879
Location
US
Check this link


notice how you scroll content up and down and the image stays static in a fixed position. How is this done?

I tried using something like:
Code:
<body>
  <div id="fixedimg"></div>
  <div id="wrapcontent">
    <div> ... </div>
    <div> ... </div>
  </div>
</body>

with CSS that would place a background image in fixedimg layer w/out repeat using a z-index of 1; while wrapcontent was set to z-index of 5.

I appear to get the fixed image to stay fixed but the content is not visible, as if it goes behind the fixedimg layer even when the z-index is higher.

Suggestions?

Thank you all in advance for your help!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Now, why didn't I think of that? :-)

Having looked at the referenced code and its associated layer, I was able to easily spot what I was missing and I now have what I was looking for.

Thanks!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top