| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jan 2005
Posts: 431
![]() ![]() ![]() | 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 |
| |
| | #2 (permalink) |
| Senior Member Join Date: Aug 2003 Location: Canada
Posts: 1,257
![]() ![]() ![]() ![]() | 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 TS Design Group - Vancouver, BC based Graphic Design >> Do you Frawlik? << |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Jan 2005
Posts: 431
![]() ![]() ![]() | thanks, what's the code for doing that?
__________________ www.VWNG.com - Very Wise Name Generator |
| |
| | #4 (permalink) |
| Senior Member Join Date: Aug 2003 Location: Canada
Posts: 1,257
![]() ![]() ![]() ![]() | In <head> add the following: Code: <style type="text/css">
img{max-width:100px;max-height:100px}
</style>
__________________ Near Fantastica | Matthew Good - Vancouver TS Design Group - Vancouver, BC based Graphic Design >> Do you Frawlik? << |
| |