How to CSS an image to not go wider than it's loaded size
Posted: Mon Aug 07, 2017 9:02 am
We have a Wordpress Blog and we have overwritten some CSS so the DIVs go wider. However the images inside the DIV are stretching too.
One image is loading at 590px, but it stretching at full width.
I thought this would stop it:
As I thought max-width loads it to 100% only, if it's designated size.
What is the right way to make sure any image there loaded, never go wider than it's core width? ie. 590. But some maybe 790, 850... etc.
One image is loading at 590px, but it stretching at full width.
I thought this would stop it:
Code: Select all
#grve-single-media img
{
max-width: 100% !important;
}
What is the right way to make sure any image there loaded, never go wider than it's core width? ie. 590. But some maybe 790, 850... etc.