Kiara wrote:

> Hello everyone,
> 
> I'm sorry to bother with such a stupid issue but I couldn't find a way to
> explain (first to myself and then to my boss) why if I don't put the height
> and width attribute to any image of my page IE doesn't show it
>
> I know defining height and width is a good practice and makes your code
> valid.
> 
> thanks a lot!
> 
> Kiara

Hi Kiara

We will need a test case here to see what's happening as what you say is not 
quite correct.

Since an image (inline replaced element) has a intrinsic dimension [1], "no" 
width or height is needed in the html or CSS at all for it to be shown.

Defining a height and width in the html for an image keeps a space reserved on 
the page for the image before it has downloaded. Any defined dimension in the 
html will overrule any intrinsic dimension or any dimension in the CSS for an 
image. 

Defining a height and width in the CSS for an image will overrule the intrinsic 
dimension of the image and is the value that is used by the user agent, but 
before the image is fully downloaded, the intrinsic dimension is unknown so the 
width and height in the CSS can not computed as a used value, so because of all 
this, it is common to have any dimension first given in the html.

Does that make sense. I bet the boss will say "what!".

[1] <http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width>

Kind Regards, Alan

<http://css-class.com/>

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to