Is there a way to resize (scale down) images proportionally using ONLY CSS?
I'm doing the JavaScript way, but just trying to see if this is possible with CSS.
Is there a way to resize (scale down) images proportionally using ONLY CSS?
I'm doing the JavaScript way, but just trying to see if this is possible with CSS.
Try this:
image_tag("/icons/icon.gif", height: '32', width: '32')
I need to set height: '50px', width: '50px' to image tag and this code works from first try note I tried all the above code but no luck so this one works and here is my code from my _nav.html.erb:<%= image_tag("#{current_user.image}", height: '50px', width: '50px') %>
We can resize image using CSS in the browser using media queries and the principle of responsive design.
worked just fine for me ... Or am I missing something?
Edit: But see Shawn's caveat about accidentally upsizing.
Use this easy scaling technique
To scale an image by keeping its aspect ratio
Try this,