Linked Questions
98 questions linked to/from How to auto-resize an image while maintaining aspect ratio
758
votes
18
answers
1.9m
views
Resize image proportionally with CSS? [duplicate]
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.
95
votes
12
answers
539k
views
Make an image responsive - the simplest way [duplicate]
I notice that my code is responsive, in the fact that if I scale it down to the size of a phone or tablet - all of the text, links, and social icons scale accordingly.
However, the ONLY thing that ...
37
votes
12
answers
41k
views
How to scale an image to cover entire parent div? [duplicate]
http://jsfiddle.net/Log82brL/15/
This <img> isn't shrink wrapping as I would expect with min-width:100%
I'm trying to shrink the <img> until either height or width matches the container
...
1
vote
3
answers
6k
views
How do I fit an image to a div? [duplicate]
I have a problem with trying to fit an image into my div. My image is bigger than my div, so when I do the traditional
style="width:100%;"
it will resize the div, taking up more space than it ...
4
votes
2
answers
3k
views
Resizing image base on the longest side [duplicate]
I'm trying to find a method to re-size image (.jpg) file base on the longest side. Images taken vertically and horizontally will have different longest side, I'm trying to fit them into a size-fixed ...
3
votes
3
answers
1k
views
How do i resize an image based on its div width? [duplicate]
I'm in the beginning stages of my 1st bootstrap site, and can't remember how to pass the document.getElementByClass("mydiv").offsetWidth to the CSS in order to dynamically scale the SVG images ...
2
votes
0
answers
2k
views
How to Stretch image to fit DIV size [duplicate]
I have a DIV of 100px height & width and I am trying to fit an image of 800x800 pixels. Initially, the image seems very small, if I increase the min-height and min-width to 200px, then it seems ...
7
votes
1
answer
485
views
Resize SMALLEST image dimension [duplicate]
This seems like something that would've been asked before but I can't find the duplicate so...
I want the smallest dimension of an image to be scaled max 200 while keeping aspect ratio. So:
A 600x400 ...
-1
votes
3
answers
680
views
How to resize image in div to cover? [duplicate]
Ok, I guess you've heard this one before... I tried to find a solution, but can't find one. I have a container that covers the left 50% of a screen. Inside the container I want an image to cover the ...
2
votes
1
answer
407
views
Placing images in a div based on the pixel values [duplicate]
Hi I have a div which is my nav bar, when I want to place my logos in the nav bar.
Code
<div class="first_bar">
<img class="home" src="../../assets/Home Unclicked-01.png">
&...
0
votes
1
answer
284
views
figure style not applied to the image tag [duplicate]
i'm trying to display html text stored in server data base. but the style of figure tag not working and the image is displaying in original size
<body>
<figure style="width:50%;">...
0
votes
1
answer
156
views
How to make this image responsive while retaining its aspect ratio [duplicate]
I am currently working on a website design using HTML and CSS and I want to position this image to fit in the page like this:
I need it to be responsive.
What I did for its part is:
HTML:
<div ...
0
votes
0
answers
114
views
Image not resizing? (Bootstrap) [duplicate]
I'm trying to add an image for a logo on top of a background image.
The background image resizes but the logo doesn't.
Any tips as to where I've gone wrong?
Thanks
<body>
<div class="...
0
votes
2
answers
54
views
difference between setting width and height of img [duplicate]
I would like to put an image to fit some containers based on the height or the width.
The outer container A have the fixed width and height.
I only need to set the img like width:100% if I want it to ...
0
votes
1
answer
43
views
How do I make my images responsive for mobile viewers? [duplicate]
I've looked at many other threads concerning this question but none of the solutions seem to be working. For example, max-width: 100% and height: auto does not make the images responsive. They look ...