i need to rotate image in css for ie6
is it possile
i tried Below code But none of Below is working
.image-box
{
-filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); /* IE6,IE7 */
-filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); /* IE6,IE7 */
ms-filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); /* IE8 */
-ms-filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); /* IE8 */
transform: rotate(180deg);
-moz-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-sand-transform: <rotate(180deg)>;
}
please help!!!
You're not supposed to have a hyphen before non vendor specific CSS properties. Remove the hyphen from -filter: ...:
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); /* IE6,IE7 */
Additionally, you might need to trigger hasLayout by adding overflow:auto or zoom:1 to your CSS. Here is a demonstration (I've tested this in IE7 using browserlabs).
IE6 has limited support, even from MS. You probably should use IE conditional comments to provide a different image or markup for IE6. Here's the MSDN article on these http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx
Related
I have this stylesheet
.rotate div img
{
-webkit-transform: translate(-18cm, 2cm) rotate(-90deg); /* WebKit */
-webkit-transform-origin: top right;
-moz-transform: translate(-18cm, 2.5cm) rotate(-90deg);/* Mozilla */
-moz-transform-origin: top right;
-o-transform: rotate(90deg); /* Opera */
-o-transform-origin: top center;
-ms-transform: translate(-18cm) rotate(-90deg); /* Internet Explorer */
-ms-transform-origin: top right;
-sand-transform: translate(-18cm, 2.5cm) rotate(-90deg);
-sand-transform-origin top right;
max-width: 100% !important;
}
I'm having trouble with IE, the transforms are applied and are showing on screen
but when I click on the print button, the printed result is without the transforms applied to it.
(added screen in the media to see the effects, before printing)
It works fine with Firefox and Chrome
EDIT
Yes, I was testing on IE9.
Having played with it a bit more yesterday, I noticed that the image did in fact do the transform part, but what is sent to the printer is the image without the transform applied to it.
-ms-transform does not exist in IE10+. IE8 and older have no support for CSS transforms, IE9 uses only -ms-transform, and IE10 and newer use only the unprefixed transform.
See http://caniuse.com/#feat=transforms2d for more info if needed.
I has same issue but resolved by setting up media attribute to style tag as follows
<style type="text/css" media="print">
No need for fancy prefixes, just use normal transform to target MS IE!
I am trying to rotate a text to 270 degrees, using this code:
/* Safari */
-webkit-transform: rotate(-90deg);
/* Firefox */
-moz-transform: rotate(-90deg);
/* IE */
-ms-transform: rotate(-90deg);
/* Opera */
-o-transform: rotate(-90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
It works fine in all browsers but not in IE8. What am I doing wrong?
Try using this:
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.00000000, M12=1.00000000, M21=-1.00000000, M22=0.00000000,sizingMethod='auto expand')";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.00000000, M12=1.00000000, M21=-1.00000000, M22=0.00000000,sizingMethod='auto expand');
-moz-transform: matrix(0.00000000, -1.00000000, 1.00000000, 0.00000000, 0, 0);
-webkit-transform: matrix(0.00000000, -1.00000000, 1.00000000, 0.00000000, 0, 0);
-o-transform: matrix(0.00000000, -1.00000000, 1.00000000, 0.00000000, 0, 0);
IE uses another filter to rotate elements.
Here you can read about it
http://msdn.microsoft.com/en-us/library/ms533014(v=vs.85).aspx
And here you can easy calculate coeffitients of rotation matrix http://www.boogdesign.com/examples/transforms/matrix-calculator.html
Just enter the degree value and it will generate the needed code
You need to add just one line of code:
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-0.00000000, M12=1.00000000, M21=-1.00000000, M22=-0.00000000,sizingMethod='auto expand')";
IE8 does not support this CSS element.
See: http://social.msdn.microsoft.com/Forums/eu/iewebdevelopment/thread/9b21a3c2-6bdf-4aad-a90d-868bdeb3d866
If you are rotating elements just in IE8+, you'll still need a cross-browser approach. That's because the IE filters are deprecated as of IE9, with IE9 now supporting the CSS3 -ms-transform property. However, for IE8 and earlier, a filter such as BasicImage will be necessary to achieve the effect. So to cater for versions in current use, plus future variations, a prudent approach might be to feed the filter to IE8 and earlier through Conditional Comments, but otherwise use a transform set to cater for current browsers.
Hi am using css transform in scale property my code is like this
-webkit-transform: scale(1.05); /* Safari and Chrome */
-moz-transform: scale(1.05); /* Firefox */
-o-transform: scale(1.05); /* Opera */
-ms-transform: scale(1.05); /* IE 9 */
transform: scale(1.05);
Here not supported in ie7 letyou known the answer please reply me ASAP.
I'm not sure I understand your question. CSS transforms are not supported in IE8 or older, where you have to have to use an IE matrix filter in order to achieve the same effect (scale or rotate).
Like this (code for IE8 and older, check it live with IE8 or older at http://jsfiddle.net/thebabydino/5XdSy/ ):
filter: progid:DXImageTransform.Microsoft.Matrix(
M11=1.05,
M12=0,
M21=0,
M22=1.05,
SizingMethod='auto expand');
Also, your code is CSS and you've put it between div tags.
Older IE browsers don't support CSS transformations. Try using a polyfill like Transformie.
or control the rotation to specific degrees with CSS
You can use transform: rotate(35deg). More in this article. For the moment, you have to add in the vendor-specific transforms as well, so for instance (cribbing from the article):
.rotate35 {
/* Safari */
-webkit-transform: rotate(35deg);
/* Firefox */
-moz-transform: rotate(35deg);
/* IE */
-ms-transform: rotate(35deg);
/* Opera */
-o-transform: rotate(35deg);
/* Standard */
transform: rotate(35deg);
}
You can do a 35-degree angle for older IEs that require filter. This will work in IE7 and IE8:
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.81915204, M12=-0.57357644, M21=0.57357644, M22=0.81915204,sizingMethod='auto expand');
Note, however, that the matrix transformation will leave you with a different offset than the CSS3 way shown above. You can compensate on the CSS3 side by setting the -webkit-transform-origin to left top, or on the IE side by positioning your element with a conditional style sheet or CSS hack.
Check out the MS docs or the cool page I used to generate the above.
There is but its CSS3, it of course presents problems when it comes to 'cross-browser' support. But short answer, yes, in CSS3.
Example link: http://www.thecssninja.com/css/real-text-rotation-with-css
Use
-webkit-transform:rotate(35deg);
-moz-transform:rotate(35deg);
transform:rotate(35deg);
for nearly all browsers.
Check this out: http://www.w3.org/TR/2011/WD-css3-2d-transforms-20111215, more specifically the rotate(angle) function.
Note that this works only in CSS3.
I have a page that houses an asp GridView and I would like to display the text vertically to allow it to print better. Currently I'm using css to do that:
.rotate { -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); width: 25px; }
Which works in FF except the 25px width is ignored and in IE the width is being set correctly but the text isn't vertical. Anyone know how to make this work in both browsers?
Here's a -90 degree rotation using CSS that should work in IE:
.box_rotate {
-moz-transform: rotate(-90deg); /* FF3.5+ */
-o-transform: rotate(-90deg); /* Opera 10.5 */
-webkit-transform: rotate(-90deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',
M11=6.123031769111886e-17, M12=1, M21=-1, M22=6.123031769111886e-17); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',
M11=6.123031769111886e-17, M12=1, M21=-1, M22=6.123031769111886e-17)"; /* IE8 */
zoom: 1;
}
For your reference http://css3please.com/ is a good tool for generating these kind of CSS effect with pretty good cross browser support.
I can't really say why the width isn't applying in FF without a concrete example, but you might try setting display:block;