PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Oct 19, 2017 1:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Aug 07, 2017 9:02 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4349
Location: United Kingdom
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:
Syntax: [ Download ] [ Hide ]
#grve-single-media img
{
max-width: 100% !important;
}
 

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.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Mon Aug 07, 2017 9:03 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6573
Location: WA, USA
Images don't naturally stretch, so if that's happening then you have some CSS somewhere responsible for it.


Top
 Profile  
 
PostPosted: Mon Aug 07, 2017 9:29 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4349
Location: United Kingdom
YEah. I tried width: auto; and that did it. ta.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group