NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page max image width

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 12-19-2006, 07:05 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
simonj's Avatar
Join Date: Jan 2005
Posts: 431
simonj is a jewel in the roughsimonj is a jewel in the roughsimonj is a jewel in the rough
 



max image width


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
__________________
www.VWNG.com - Very Wise Name Generator
simonj is offline  
Old 12-19-2006, 07:36 PM   #2 (permalink)
Senior Member
 
Crusader's Avatar
Join Date: Aug 2003
Location: Canada
Posts: 1,257
Crusader is just really niceCrusader is just really niceCrusader is just really niceCrusader is just really nice
 



If you make a css class for images you can do something like this:

max-width:174px;
max-height:174px
Crusader is offline  
Old 12-19-2006, 08:18 PM THREAD STARTER               #3 (permalink)
NamePros Regular
 
simonj's Avatar
Join Date: Jan 2005
Posts: 431
simonj is a jewel in the roughsimonj is a jewel in the roughsimonj is a jewel in the rough
 



thanks, what's the code for doing that?
__________________
www.VWNG.com - Very Wise Name Generator
simonj is offline  
Old 12-20-2006, 05:26 PM   #4 (permalink)
Senior Member
 
Crusader's Avatar
Join Date: Aug 2003
Location: Canada
Posts: 1,257
Crusader is just really niceCrusader is just really niceCrusader is just really niceCrusader is just really nice
 



In <head> add the following:

Code:
<style type="text/css">
img{max-width:100px;max-height:100px}
</style>
Hope that works!
Crusader is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:32 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger