HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Static image in background, with static image in foreground
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
getintanked



Joined: 03 Feb 2008
Posts: 1

PostPosted: Sun Feb 03, 2008 12:30 pm     Static image in background, with static image in foreground Reply with quote

I need help with positioning a static image that will be in the back ground (not neccearily the background-image) with another image directly on top of it so that text can scroll inbetween them as you go down the page. While the images stay at the top of your screen while you scroll.

I've tried several differnt ways and I can't get it to do what i'm describing...

Any ideas?
madprof



Joined: 26 Jan 2008
Posts: 98

PostPosted: Sun Feb 03, 2008 2:03 pm     Reply with quote

Try this:

Create a <div> with a background image that has background-attachment: fixed and is relatively positoned. Put the text in this.
Then create, within this same <div>, another <div> that is absolutely positioned where you want it and make sure it has a height and width applied to it big enoughj to fit the image. Then make this image a background image and background-attachment: fixed

I've tried this on FF and IE 7 and it seems to work.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial