<style type="text/css">
div.rotated180 {
/* CSS3 then proprietary code */
rotation: 180deg;
/* for firefox, safari, chrome, etc. */
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
/* for ie */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
</style>
and i used this css in div like this;
<div id="imgid2div" class='rotated180'>
Here, in this page;
Select first and second connector as;
N-female–>75–>crimp–>straight connector
and observe the change.
Second connector is not rotating,why?
In mozilla, the css is working fine. but not in IE and chrome…
I can’t test in webkit, but you could apply the rotation to the actual image instead of rotating the div that contains it. It’s possible that your heavy table layout is causing you problems with it.
I am using the onchange function to get the selected image name, and select the image and identifying the div and displaying it, by getting the div id.
like this;
function getCity(strURL) {
var req = getXMLHTTP();
if (req) {
req.onreadystatechange = function() {
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
document.getElementById('imgiddiv').innerHTML=req.responseText;
} else {
alert("There was a problem while using XMLHTTP:\
" + req.statusText);
}
}
}
req.open("GET", strURL, true);
req.send(null);
}
}
Is there any other why to get the image url and display it based on the selection of select box item…?
Earlier, in Mozilla it is working fine…But not in chrome angle changes +90 instead of 180 and in IE remains same(angle 0)…
After i make the changes also, in mozilla it is working fine…
and in chrome the angle changes -90 instead of 180.
Well, first off, a thing I’ve missed: you have the DTD commented, which makes IE go in quirks mode.
Second, maybe this is what is causing you problems:
$('#imgid2div').rotate({angle:90})
EDIT: It seems to me you need to decide: jQuery rotate or CSS3 rotate. It seems you need to stick with jQuery, since the functionality implies Javascript be enabled.
Ya, i tried and solved in opera also…
Thank you…
But after showing the hidden items based on the selection of previous one,
the div is expanding(top and bottom), why?
how to overcome this, and fix this…
div is the parent for the elements, so it will adjust its size to accomodate for the child elements box models. Unless the child elements are taken out from the normal flow, in which case, unless otherwise specified, the parent element will calculate and adjust its size accounting only elements that are in the normal flow, plus its own box model sizes.
If you want a fixed height for the div, you should specify this, using the height related CSS properties, and probably make the overflow hidden. It’s possible that by doing so, some part of the content will overflow and be… hidden, so you need to calculate carefully.