search

Home  >  Q&A  >  body text

Image size exceeds container limit

<p>I've posted the following screenshot showing one image exceeding the limits of its container, while the other images are stacked correctly. I haven't done anything in CSS yet. enter image description here</p> <p>I specifically tried using max-width for that particular image, but as soon as I display the div containing all the images as a grid, it goes over the limit. </p>
P粉083785014P粉083785014501 days ago581

reply all(1)I'll reply

  • P粉754477325

    P粉7544773252023-08-15 18:46:04

    You can try using the style width: 100% in your img tag. like this:

    <img src="..." style="width: 100%"

    This will force your image to be as wide as the container.

    reply
    0
  • Cancelreply