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

Creating fixed layer in scrollable content

Status
Not open for further replies.

Quasibobo

Programmer
Oct 11, 2001
168
NL
Hello,

In order to keep the layout of some of my clients pages in shape I must be able to create a fixed layer within a scrollable content.

For instance I want an image to be placed at top: 100px and left: 50px from the frameborders. It has to stay there whenever the content is of that frame is scrolled.

Please help...

Don't eat yellow snow!
 
Set the image to be a background image for the frame (you can set it's X and Y position and prevent it from scrolling). The following CSS can be applied to the body of the frame...

Code:
body
{  background-attachment:fixed;
   background-position:100px 50px;
   background-image:url(../images/mybackground.gif);
   background-repeat:no-repeat;
}

This won't create a fixed layer as such... it will assign a background image that will not scroll. You can have one (and only one) background image per page.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top