|
Posted by Jonathan N. Little on 06/13/06 04:47
fred.haab@gmail.com wrote:
<snip>
> I know I'm going to get slaughtered for saying this, as most of the
> zealots out there will tell you this is highly inappropriate use for
> tables (and they'd be right), but simply slapping the image in a table
> will stop the big three (Firefox, IE, and Opera) from scaling the
> image.
>
Yes it is improper use of a table, but the 'jump on you' will be that
your statement is flatly false. A table is not constrain an image, even
in quirks mode and old markup
<table>
<tr><td width="200"><img src="500pixel.jpg"></td></tr>
</table>
The table will grow to accommodate the full 500p pixels....
> Now, please take into consideration everything everyone else has
> said... you probably shouldn't do this... but the option is there if
> you insist.
>
There is now way to really 'force' an image to scale to the browser
window if the user doesn't want to. You could use JavaScript to rescale
image to window but the user could thwart you by disabling JavaScript.
You could use a CSS method
IMG {display: block; width: 100%; }
But the user window may not accommodate the height, if you add
height: 100% you will distort the aspect of the image. And the user can
disable your CSS with a modern web browser.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|