CSS for top right corner of the page

If the text isn't an image, none of the other answers will work. Here is some css that rotates a div 45 degrees and works in IE + FF + Webkit.

#yourdiv
{
    top: 0px;
    right: 0px;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
     transform: rotate(45deg);
     filter: progid:DXImageTransform.Microsoft.Matrix(M11='0.7071067811865476', M12='-0.7071067811865475', M21='0.7071067811865475', M22='0.7071067811865476', sizingMethod='auto expand');
}

Make sure it's a transparent PNG

#Element {
   position: fixed;
   top:0;
   right:0;
z-index:10;
}

(An element with greater stack order is always in front of an element with a lower stack order.)


div.topRight {
    position: absolute;
    top: 0%;
    right: 0%;
}

This will assign a division with class set as 'topRight' to the top right corner. I'm sure you can figure out how to get the image to show up properly from that. Make sure you set the proper width and height on it. As for hovering, what exact effects do you want? You can modify the CSS on hover easily, if that's all you want to do.

div.topRight:hover {
    // new css rules
}

Tags:

Html

Css