Forum Moderators: not2easy

Message Too Old, No Replies

Trying to add a moving element to fixed width design.

         

kevdog

3:10 am on Aug 22, 2008 (gmt 0)

10+ Year Member



Is it possable to append a picture about 50X100px to the right of the container div "outer" that will stick to its right side but move in a "fixed" way when the user scrolls down?

<html>
<style>

body {
background: #000000;
text-align:center;
}

#outer {
width:850px;
margin: auto;
background-color: #FFFFFF;
height:2000px;
}

</style>

<body>
<div id="outer">
</div>
</body>

Maybe not a job for CSS?

</html>

csuguy

2:27 pm on Aug 22, 2008 (gmt 0)

10+ Year Member



First - put an inner div in there with this css:

#inner
{
width:100%;
height:100%;
}

After that div - add the img tag and give it the following CSS:

#sideImg
{
position:absolute;
top:0px;
left:-100%; /*if this doesnt work just put -50px for the 50x1000 img*/
}

That should do it.
Ryan