resize to fit the screen using css - html

http://i.stack.imgur.com/yY4pG.png <--- Not enough reputation to post images.
This is how my website looks without any browser zoom on a 27" screen.
I know about this but I dont know how to use it.
-webkit-transform: scale(0.5); /* Chrome, Safari 3.1+ */
-moz-transform: scale(0.5); /* Firefox 3.5-15 */
-ms-transform: scale(0.5); /* IE 9 */
-o-transform: scale(0.5); /* Opera 10.50-12.00 */
transform: scale(0.5);
offsetRatio = (ratio - 1) / 2;
So how do I make my site auto scale??

You can always use this:
width:100%;
http://www.w3schools.com/cssref/pr_dim_width.asp

Related

How to set Image width 1/2 of default without using javascript

I am going to show image .5 times smaller than normal.
Normal code
<img src = "./bk.jpg"/>
Tried this one
<img src = "./bk.jpg" width = "50%" height = "50%"/>
But this width is parent <div>'s 50% not default width's 50%.
I can do it in javascript like below
img = getElementById();
img.onload = function(){
img.width /= 2;
...
}
But I think it can be done only using css.
Please any kind of help!
You can do it using css scale property
.half{
-ms-transform: scale(0.5);
-webkit-transform: scale(0.5);
transform:scale(0.5);
}
<img src = "http://lorempixel.com/200/200/"/>
<img src = "http://lorempixel.com/200/200/" class="half"/>
I think this is the portion of css that you need
img {
-webkit-transform: scale(0.5); /* Saf3.1+, Chrome */
-moz-transform: scale(0.5); /* FF3.5+ */
-ms-transform: scale(0.5); /* IE9 */
-o-transform: scale(0.5); /* Opera 10.5+ */
transform: scale(0.5);
}​

Rotate IE7 90 degree

Is there a way to rotate IE7 90% (the whole page)? I tried to rotate body and HTML element 90 degree by using CSS, but scroll bars are displaying because the width and height are not fix the window. I just want to rotate whole html 90% and the width and height are fix the window. Please help me.
How can I do that? (Maybe using CSS or something else). Thank so much.
Sorry about my English.
I have found the following links which may help you:
https://code.google.com/p/jqueryrotate/wiki/Examples
or perhaps:
http://raphaeljs.com/
Raphael supports rotation for IE6 onwards, I hope this helps you in your research.
Use below code that will support in all browser,
/*rotate 60 degrees*/
#rotate60 {
/*General*/
transform: rotate(60deg);
/*Firefox*/
-moz-transform: rotate(60deg);
/*Microsoft Internet Explorer*/
-ms-transform: rotate(60deg);
/*Chrome, Safari*/
-webkit-transform: rotate(60deg);
/*Opera*/
-o-transform: rotate(60deg);
/*alter opacity*/
opacity:0.6;
filter:alpha(opacity=60);
}
/*rotate 90 degrees*/
#rotate90 {
/*General*/
transform: rotate(90deg);
/*Firefox*/
-moz-transform: rotate(90deg);
/*Microsoft Internet Explorer*/
-ms-transform: rotate(90deg);
/*Chrome, Safari*/
-webkit-transform: rotate(90deg);
/*Opera*/
-o-transform: rotate(90deg);
/*alter opacity*/
opacity:0.4;
filter:alpha(opacity=40);
}
and use overflow hidden for scrolling part.

Rotate a block element [duplicate]

This question already has answers here:
How to rotate a <div> 90 degrees?
(6 answers)
Closed 9 years ago.
Is it possible to rotate a block-level box, generated by block element relative to this geometrical center. E.g. as follow:
You can use CSS transform:
transform: rotate(-200deg);
-ms-transform: rotate(-200deg); /* IE 9 */
-webkit-transform: rotate(-200deg); /* Safari and Chrome */
Demo
The transform property is supported in Internet Explorer 10, Firefox, and Opera. You do not need to use CSS prefixes for these.
-moz-transform: rotate(30deg);
-o-transform: rotate(30deg);
transform: rotate(30deg);
-webkit-transform: rotate(30deg);
The property transform in CSS3 does this. You need to use vendor prefixes for some browsers.
Here is an example: http://jsfiddle.net/gfEL5/
-moz-transform: rotate(30deg); /* FF after 3 and before 16 */
-ms-transform: rotate(30deg); /* IE 9 */
-o-transform: rotate(30deg); /* Opera after 10.5 and before 12 */
-webkit-transform: rotate(30deg); /* current Chrome, Safari, Opera */
transform: rotate(30deg); /* IE after 10, FF after 16 */
It rotates around the center by default, but you can set another transform-origin as well. More about this: https://developer.mozilla.org/en-US/docs/Web/CSS/transform

Automatically zoom out the whole website on Magento?

is there a way to make my website automatically zoom out to 90% ?
Thanks
This can be done with css3 scale attribute but beware that this is not support on all browsers.
http://www.w3schools.com/css3/css3_2dtransforms.asp/
body{
transform: scale(0.9);
-ms-transform: scale(0.9); /* IE 9 */
-webkit-transform: scale(0.9); /* Safari and Chrome */
-o-transform: scale(0.9); /* Firefox */
}
Or with jquery and javascript for cross browser by appending a div around the content off the site and scaling to 90% off the body width;
Something roughly like
var bdwidth = $("body").width();
$("wrapper").width((bdwidth / 100)*90);
Use CSS
body {
-moz-transform: scale(0.9, 0.9); /* Moz-browsers */
zoom: 0.9; /* Other non-webkit browsers */
zoom: 90%; /* Webkit browsers */
}
This worked for me!

CSS3 Rotation issue

I'm setting everything in a div tag to appear horizontal. However i have elements in this div tag that i want to appear vertical.
My horizontal styled div is
/* 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);
How would i effectively get rid of this transformation on a seperate div?
If you want to reset it on the child element, undo the rotation ( http://jsfiddle.net/yDGqz/):
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
You might want to set the transform-origin property to change the rotation origin of the element.