skip to Main Content

I’m rather bad at HTML and looking to have an image resize itself automatically when the browser size is changed (zooming in and out). This is for an ebay listing template. The template as a whole is perfect minus the image does not fit the same when zooming in and out. Any help is appreciated. Thank you.


<h1 style="text-align: center; line-height: 100%"&gt&ltfont face="Arial" style="font-size: 14pt; color: rgb(53, 53, 53);"&gt&ltimg alt="Aleq" class="mx-auto d-block img-fluid" src="https://example.com"&gt

2

Answers


  1. For the image to resize based on the browser width change, you can take a look at this resource. It talks about few css tricks you can do to make your images responsive.

    https://www.w3schools.com/css/css_rwd_images.asp

    Login or Signup to reply.
  2. A simple way of doing this would be to add a max-width property to your image in your css file.

    For example, if you gave your image a class of "stackoverflow-img" it would be:

    <style>
        .stackoverflow-image{
            max-width: 100%;
        }
    </style>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search