You are here: Re: want max width and max height as long as not exceed 100px « HTML « IT news, forums, messages
Re: want max width and max height as long as not exceed 100px

Posted by Summercool on 10/23/07 01:42

On Oct 22, 6:10 pm, dorayme <doraymeRidT...@optusnet.com.au> wrote:

> img {max-width: 100px;}
>
> or
>
> img {max-height: 100px;}

>
> <img class="landscape" src="pic.jpg" ...> and in your css, put
> only a width, say 100px. It will find its natural height.
>
> <img class="portrait" src="pic.jpg" ...> and in your css, put
> only a height, say 100px. It will find its natural width.

I think max-width and max-height both work in Firefox and Safari (the
latest), but not on IE 7.0....

that's a great solution, landscape and portrait....
is it true you still have to use javascript to tell whether it is
landscape or portrait if the picture is unknown beforehand from the
database?

at least I can pass a parameter to the next .php file saying whether
it is landscape or portrait and that can be cleaner than passing the
width x height.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация