• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 744
  • Last Modified:

How to rotate a div in IE?

Hi,

 I am trying to rotate a div in IE like so:

      filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

but its not working, even though thats the code format many websites say to use.  Does anyone know how to make this work??
0
FairyBusiness
Asked:
FairyBusiness
  • 3
  • 3
2 Solutions
 
jonahzonaCommented:
Well, your code looks correct, but I put it together but it reacts differently in different versions of explorer.

Check this page:

http://rdsrc.us/rogWOX

In IE9 the div itself rotates, but the content does not. But in compatibility mode, it all rotates. Not sure why that is.

Here is the code.

 
<!DOCTYPE html PUBLIC "-//W3C//DTD 

XHTML 1.0 Strict//EN" 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1

-strict.dtd">
<html>
<head>
<style type="text/css">
div.content {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 30px;
    border-top: black 4px solid; 
    border-right: blue 4px solid; 
    border-bottom: black 4px dashed; 
    border-left: blue 4px dashed; }

.rotate  {
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -o-transform: rotate(-90deg);
    filter: 

progid:DXImageTransform.Microsoft.Basic

Image(rotation=3); }

.txtblock {
    width: auto;
    position: absolute;
    }

#Div1 {
    left:44px; 
    top:70px; 
    border:red 3px solid; }

#Div2 {
    left:13px; 
    top:170px; 
    border:purple 3px solid;  }
</style>
</head>
<body>
 <div class="content rotate">
    <div id="Div1" 

class="txtblock">Ardvark Avacado<br 

/>Awkward</div>
    <div id="Div2" 

class="txtblock">Brownies<br />Bacteria 

Brussel Sprouts</div>
  </div>
</body>
</html>

Open in new window


Do you have a link to a page you are trying to make work? It may take some work to make it appear correctly in all versions of IE =< 7.
0
 
FairyBusinessAuthor Commented:
yeah heres the link:

http://gowiththemaster.com/tleithoff/index2.php

its not working right in IE 8 or 9.  I don't have any other earlier versions.
0
 
jonahzonaCommented:
Ummmm....I was working on it and then it 404'd.

Did you move or rename it?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
FairyBusinessAuthor Commented:
yeah sorry it should work now!
0
 
jonahzonaCommented:
This looks like it may help. Take a read.

http://www.aquim.com/web-article-226.html
0
 
FairyBusinessAuthor Commented:
thanks
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now