Previous Message
Next Message

Re: [css-d] Re: width/height and css layouts

Sent by dylan foley on 24 April 2002 14:02


> 
> Rubbish. Perfectly valid question, re CSS-LAYOUTS

My appologies. When you asked:
"I seem to remember something about width/height attributes being
unneccessary with css layouts though, is this correct or should I be
using them on my images?"

I assumed you were asking about the HTML <img> element and its 
width/height attributes. If you meant applying width/height CSS *properties* 
to images in your HTML document then perhaps my answer was 
inappropriate.
 
> I wonder if anyone would know the ins and outs of specifying an img's
> height/width in the stylesheet, it seems an odd issue. 

"In CSS2 it is assumed that all replaced elements -- and only replaced 
elements -- come with intrinsic dimensions."
http://www.w3.org/TR/REC-CSS2/conform.html#intrinsic

This would include images. Therefor, you are not required to include width 
and height properties for images.

If you have a group of images that you want to be rendered at the same size, 
specifying width/height properties in your CSS may be a good way to go. If 
your images are of varying sizes, then perhaps it may be burdensome to do 
this as you would need to create id's for each image or classes for each 
group of equally sized images.

-- 
dylan
Previous Message
Next Message

Message thread:

Possibly related: