[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 12-19-2006, 06:05 PM   #1 (permalink)
NamePros Regular
 
simonj's Avatar
 
Join Date: Jan 2005
Posts: 382
96.00 NP$ (Donate)

simonj has a spectacular aura aboutsimonj has a spectacular aura aboutsimonj has a spectacular aura about


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
__________________
Very Wise Name Generator - Scan blogs, news articles, or websites for potential Domain Names - VWNG.com
simonj is offline  
Old 12-19-2006, 06:36 PM   #2 (permalink)
Senior Member
 
Crusader's Avatar
 
Join Date: Aug 2003
Location: Canada
Posts: 1,293
1,264.40 NP$ (Donate)

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
__________________

Near Fantastica
| Matthew Good - Vancouver
>> Do you Frawlik? <<
Crusader is offline  
Old 12-19-2006, 07:18 PM   #3 (permalink)
NamePros Regular
 
simonj's Avatar
 
Join Date: Jan 2005
Posts: 382
96.00 NP$ (Donate)

simonj has a spectacular aura aboutsimonj has a spectacular aura aboutsimonj has a spectacular aura about


thanks, what's the code for doing that?
__________________
Very Wise Name Generator - Scan blogs, news articles, or websites for potential Domain Names - VWNG.com
simonj is offline  
Old 12-20-2006, 04:26 PM   #4 (permalink)
Senior Member
 
Crusader's Avatar
 
Join Date: Aug 2003
Location: Canada
Posts: 1,293
1,264.40 NP$ (Donate)

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!
__________________

Near Fantastica
| Matthew Good - Vancouver
>> Do you Frawlik? <<
Crusader is offline  
Closed Thread


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 08:18 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85