Forum Moderators: not2easy

Message Too Old, No Replies

Logo Sticky to the right

What to use to make a logo sticky to the right

         

302gt

9:47 pm on Oct 31, 2005 (gmt 0)

10+ Year Member



I saw the csszengarden page and noticed the picture on the righthand top is sticky to the right and stays there no matter how far i reduce the windows size.

My Simple question: how does it work?

Robin_reala

9:51 pm on Oct 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



img#logo { position: fixed; right: 0; top: 0; }

It doesn't work with IE though. The only form of fixed positioning IE supports is on background images. For that you'd do something like:

body { background-image: url(whatever); background-position: top right; background-atachment: fixed; }

As far as I'm aware this only works on the <body> element in IE.

302gt

11:15 pm on Oct 31, 2005 (gmt 0)

10+ Year Member



I am a newbe could you elaborate a bit more?
( and yes IE would be the target browser)

outrun

12:16 am on Nov 1, 2005 (gmt 0)

10+ Year Member



Just float it to the right should do the trick in IE in your css have something like:

.fright{
position:relative;float: right;
}

And for placing the image Image

<div class="fright"><img src="logo.gif" /></div>

Or something along those lines. Don't forget the rest of the image attributes.