Reputation: 31
I want to do the folowing:
image.style.maxWidth = "400px"; image.style.width = "100%";
so the image maxwidth is 400px but if the user resizes his webbrowser window to a width of -400px the image will be resized to the same with as the window. The problem is: How do you this is non maxwidth browser? is there any way of doing this without using maxwith?
Upvotes: 1
Views: 207
Reputation: 198
You can use this css3 rule:
@media only screen and (min-width: 768px) and (max-width: 991px) {
#image {
width: 400px;
}
}
Go and check http://lessframework.com/
Upvotes: 1