Re: [WSG] image height and width question which is better CSS or inline

2005-07-09 Thread Ingo Chao

Nathan Rutman schrieb:


4) Specifying height and width on images by default was a trend made 
popular in the late 90's, where slow-to-render table-based layouts were 
used (which relied heavily on images pushing the cells around to the 
correct size/location) and everyone was using dialup access.  The 
problem was that the small placeholder used by the browser would shift 
content around when the image was loaded at its proper size.  With 
today's Internet, where a large client base is using broadband and 
developers are utilizing near-instantaneous CSS-positioned elements, 
there might not be much of a need to specify the image dimensions.  I'm 
not sure it's necessary in most cases.  No matter where you define the 
height/width, that is one more step you'd have to take if you ever 
updated the image in the future with one that isn't the same dimensions.


Nathan,
this can lead to misunderstanding.

I fear that some people have experienced IE6 and Fx1.0.4 let some page 
elements jump while rendering the page, when there is no dimension on 
images/their containers specified at all.


The designer with a quick connection and appropriate cache settings 
might not see it, and some users are wondering what he is paid for.


http://www.mezzoblue.com/archives/2005/05/10/image_attrib/comments/#c011669

Ingo
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



[WSG] image height and width question which is better CSS or inline

2005-07-08 Thread Bruce Gilbert
I have a question about which is the better way to approach adding a
height width to an image for accessibilty/standards.

img src=image.jpg height=25 width=45 /

or img src=image.jpg class=thisimage /

and in the CSS have:

.thisimage{
height:25px;
width:45px;
}

or is either one o.k?

TIA

-- 
::Bruce::
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] image height and width question which is better CSS or inline

2005-07-08 Thread Nathan Rutman

A few thoughts:

1) If you were to use CSS to specify size for the image, I don't think 
you'd want to use a class, unless it was one of many images that fits 
that style (i.e. a photo gallery thumbnail where 10-20 instances might 
appear on one page).  If you're just talking about one image, an ID 
would be more properly suited.


2) The goal of CSS is to separate content and the presentation of that 
content.  The benefit of CSS is that if you would update the image you 
could change one easy-to-find definition in the style sheet instead of 
hunting through HTML tag soup.


3) Unless you are resizing the image on the fly (the image is 300x200 
and you want to display it at 150x100 - not a best practice anyway), you 
lose nothing if you specify a style to a browser that can't interpret.  
The image will, by default, display at 100%.  The only reason I see for 
specifying height and width attributes in the IMG tag is if you are not 
displaying the image at 100% and are expecting hits from browsers that 
wouldn't recognize that basic style (Netscape 3?).


4) Specifying height and width on images by default was a trend made 
popular in the late 90's, where slow-to-render table-based layouts were 
used (which relied heavily on images pushing the cells around to the 
correct size/location) and everyone was using dialup access.  The 
problem was that the small placeholder used by the browser would shift 
content around when the image was loaded at its proper size.  With 
today's Internet, where a large client base is using broadband and 
developers are utilizing near-instantaneous CSS-positioned elements, 
there might not be much of a need to specify the image dimensions.  I'm 
not sure it's necessary in most cases.  No matter where you define the 
height/width, that is one more step you'd have to take if you ever 
updated the image in the future with one that isn't the same dimensions.


Hope that helps,
Nate

*Nathan Rutman* ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED])
Corporate Communications Designer

*Solvepoint Corporation*
882 South Matlack Street, Suite 110
West Chester, PA 19382
800.388.1850 x1208
484.356.0990 (fax)
www.solvepoint.com http://www.solvepoint.com



Bruce Gilbert wrote:


I have a question about which is the better way to approach adding a
height width to an image for accessibilty/standards.

img src=image.jpg height=25 width=45 /

or img src=image.jpg class=thisimage /

and in the CSS have:

.thisimage{
height:25px;
width:45px;
}

or is either one o.k?

TIA

 



**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] image height and width question which is better CSS or inline

2005-07-08 Thread David Laakso

Bruce Gilbert wrote:


I have a question about which is the better way to approach adding a
height width to an image for accessibilty/standards.

img src=image.jpg height=25 width=45 /

or img src=image.jpg class=thisimage /

and in the CSS have:

.thisimage{
height:25px;
width:45px;
}

or is either one o.k?

 


Major Tom says, neither:
   img src=image.jpg height=25 width=45 alt=Astronaut title=
   Major Tom took his protein pill and put his helmet on... /
(but then what does he know...?)
David Laakso

--
David Laakso
http://www.dlaakso.com/


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**