Sunday, January 18, 2009

How to position an image on Top Right Cornor of the Browser?

Following StyleSheet will position the DIV/IMG tag to the top right cornor of the browser window. This is required when absolute positioning an image is required.


DIV.TopRightCorner
{
position: fixed;
_position: absolute;
top: 0px;
right: 0px;
clip: inherit;
_top: expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);
_left: expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);
}

You can change the "top" and "right" to "botton" and "left" to appropriately position an image.
Your comments are always welcome!

2 comments:

Anonymous said...

How to position an image on Top Right Cornor of the Browser

post an html example of this
vaibhav490@rediff.com

DLeagueDaily.com said...

dleaguedaily.com has a lot of these.

do you know how to post a roll over image on the top left?

thanks

Post a Comment