This may be an oversimplified answer (I'm still new here), but what I did in the past to fix this is the percentage of the screen that I would like to draw attention to. For example, there is one webpage I'm working on, where the logo should occupy 30% of the screen size in order to look better. I played and finally tried this code and it has worked for me so far:
img { width:30%; height:auto; }
In this case, all your images will be changed by 30% of the screen size. To work around this problem, just make this class and apply it to the image you want to be 30% directly on. Here is an example of the code I wrote to execute this on the above site:
CSS part:
.logo { position:absolute; right:25%; top:0px; width:30%; height:auto; }
HTML part:
<img src="logo_001_002.png" class="logo">
Alternatively, you can put any image that you hope will automatically resize to a separate div and use the class tag parameter for each div (now creating class tags when necessary), but I feel that it will cause a lot of extra work in the end. But, if the site requires it: the site requires it.
Hope this helps. Excellent day!
Chad Nov 15 '15 at 14:26 2015-11-15 14:26
source share