views:

475

answers:

3

I have a Div layer like this

...
<style type="text/css">
<!--
#newImg {
    position:absolute;
    left:180px;
    top:99px;
    width:704px;
    height:387px;
    z-index:1;
    background-image:url(../Pictures/repbg.png);
    background-repeat:repeat;

}

-->
</style></head>

<body>

<div id="newImg" name="newImg" ></div>
...

How to rotate it?

A: 
dclowd9901
That Transform plugin if for something completely different
Dustin Laine
I was going to make a comment about "fear of the obvious going unstated" and how this only works in Firefox, but then I opened the link and saw it in action using Chrome. `-webkit-transform` apparently works, too.
keithjgrant
@dur. Thanks I threw that second option up there without reading through the doc (as I was heading to a meeting).
dclowd9901
+1  A: 

This is a jQuery plugin that will rotate the image: http://code.google.com/p/jquery-rotate/

Dustin Laine
+3  A: 

You can use cssSandpaper to use the transform property which can be used to rotate elements in Gecko (Firefox), WebKit (Safari, Chrome), Opera and even Internet Explorer.

Douwe Maan
I voted for this one because it was here first, and because the sandpaper examples worked in the browsers I tested, IE7/8 and FF.Im too lazy to check the jQuery example, though if it works, that would be my preference.
George Sisco
+1 for "and even Internet Explorer."
Thqr