Dynadot Premium User Auctions, September 8 to 16. Great domains with first bid credit.

Max image width

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

simonj

Established Member
Impact
15
Hi, forgive this newbie question...how do you set the maximum width for an image on a webpage without affecting images that are smaller? For instance, I want to limit the size a picture can be if it's too big but I don't want to stretch or resize smaller pictures.

hope I'm making sense,
thanks,
Simon
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If you make a css class for images you can do something like this:

max-width:174px;
max-height:174px
 
0
•••
thanks, what's the code for doing that?
 
0
•••
In <head> add the following:

Code:
<style type="text/css">
img{max-width:100px;max-height:100px}
</style>

Hope that works!
 
0
•••
Olitt — high-converting AI websites, only from $1/moOlitt — high-converting AI websites, only from $1/mo

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
URLs.com
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back