2006/10/17, Mark J. Reed:
> The reason it has long been recommended to include "width" and
> "height" attributes in image elements is to assist the browser in
> rendering the page.
> (...)
> Modern browsers are quite adept at shuffling things around on the page
> after the initial rendering, so my vote would be to leave off the
> width and height specifications entirely.

Mark,

You are right, modern browsers don't really need the size of the
images in pixels, but don't forget that the width and height of images
are not nesseraly given in pixels. It can be, for instance, expressed
in ems or in % (of the width of its container),

Example, look at:
  http://www.htmldog.com/articles/elasticdesign/demo/

the first image on his page has:
   <img alt="Elastic image" src="icicles.jpg" class="image" id="image1">

in the stylesheet:
.image {
        width: 30em;
        height: 15em;
        margin: 0 2em 1em 2em;
        border: 1px solid #ccc;
}

The size of the image will change with the default size of your font.

You could also have something like:
.image { width: 90%; height: auto; }

There is no other way to tell the brother what to do here. You do need
to specify at least a width or a height either in the style sheet or
in the source of your HTML document.

Regards
-- 
Philippe  DE MOURA
 ><> phdm ><>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to