Log in

View Full Version : fixed positions - probably an easy one for you guys...



radiofriendlybox
02-07-2008, 11:08 PM
hi,

please refer to: http://www.32-bits.com/capitolbowl

if you notice in the upper right-hand corner, there is a page curl image. i know enough to use css to get the image to sit in that position, but i can't get it to stay fixed there. when one resizes the window, the page curl "travels" across the browser window over other images and text. how do i get it to stay put?

thanks

Jas
02-08-2008, 12:06 AM
I think this is the code in question?

div.corner{
position:absolute;
right:0px;
top:-1px;
z-index:0;
}
This tells the image to stay on the right side no matter what. What I came up with is:


div.corner{
position:absolute;
right:0px;
top:-1px;
z-index:0;
}
div.placement{
position:relative;
float:right;
width:800px;
height:1px;
}


<div class="placement"><div class="corner">Hi!</div></div>
This tell the image where to be, and has a minimum width so it won't move to far. (Think of it as a 800px box glued to the right side of the screen ;)).
Let me know if it works :)