BASIC EDITING: Well, I just understand that there are a hundred different cases where you want to do what I want, but using different rules, so I will have to describe my specific case. I mainly use this popup image ( here)
If you squeeze the size of the window when the popup is turned on, you will notice that the popup does not compress to fit the window, which gives a bad user interface, especially in landscape mode on your smartphone.
I want my popup to shrink to fit two screen sizes, without changing the aspect ratio. (keeping it squared)
So far I have made the following changes:
.focus {
z-index: 10;
max-width: 500px;
max-height: 500px;
display: none;
}
.focus.enabled .container {
max-width: 500px;
max-height: 500px;
}
, firebug, , ... , ?
----------- ( ): ----------------
( , ) 500x500, , . html:
<html>
<head>
</head>
<body>
<img src="myimage.png" class="image" />
</body>
</html>
css:
.image {
max-height: 500px;
max-width: 500px;
height: 100%;
width: 100%;
}
css , , 500 . , 100%:
.image {
max-height: 500px;
max-width: 500px;
height: 100%;
}
, , 500 ! css , , ?