The Design of Software (CLOSED)A public forum for discussing the design of software, from the user interface to the code architecture. Now closed. |
|
|
The "Design of Software" discussion group has been merged with the main
Joel on Software discussion group.
The archives will remain online indefinitely. |
and choose colors carefully as there are people who cannot distinguish colors.
and drive more slowly as there are people who fear in a high speed crowd traffic jam and oh, use a bicycle as air pollution will kill us and yeah ... ... ... Monday, March 07, 2005
i was thinking the browser could get the image properties before downloading it...
maybe the web page server could provide the info, if its not already specified, when ever serving up an image? just speculating, i guess the fact it doesn't exist indicates its not possible/desirable..or does it?
Even if there was something like that in the HTTP spec, which there isn't, the browser would still have to connect to the web server and fetch the size of each image. That scheme only reduces the problem, it doesn't eliminate it.
There is a simple and correct solution: use width and height attributes in your image tags.
comp.lang.c refugee Monday, March 07, 2005
Just a reminder that ...
"All IMG and OBJECT attributes that concern visual alignment and presentation have been deprecated in favor of style sheets" ... though Im sure you all knew that anyway.
W3C XHTML spec Monday, March 07, 2005
Just a reminder that width and height aren't among those deprecated, see: http://www.w3.org/TR/html401/struct/objects.html#h-13.2
Samuel Monday, March 07, 2005
Just a reminder that this is why html and web programming is such a roayal pain in the a$$. ;)
Let the flames begin!
matt Monday, March 07, 2005
Just a reminder to actually read the spec ;)
From your link: 13.7 Visual presentation of images, objects, and applets All IMG and OBJECT attributes that concern visual alignment and presentation have been deprecated in favor of style sheets. 13.7.1 Width and height The hierarchy of sections would suggest that the W3C consider width and height to be "visual presentation" and hence deprecated.
W3C XHTML spec Monday, March 07, 2005
Are you sure?
Compare 13.7.1 with 13.7.2; in particular (a) that hspace and vspace are marked as Deprecated, but height and width are not (b) that hspace and vspace are absent from the description of the IMG element in 13.2 For what it is worth, I just tried running an image through the w3 validator (http://validator.w3.org) and it blessed an image date with both height and width attributes. Also, a quick check against google groups turns up a lot of "yeah, I read that to mean it was deprecated until [mumble] straightened me out" comments.
Um, "image date" -> "IMG tag".
Sorry, followed a link about international date formats and it muddied my thinking.
Hi Danil,
Im not sure Im right ;) Out of interest, is your HTML set to strict or transitional? I Googled this one a while back and found a mix of yeahs and no's like you did yourself. I personally hate putting any non-essential attributes in the html as it feels to break the essence of presentation and content separation. But putting the dimensions in CSS is very verbose as you need the extra overhead of id'ing the images and then referencing them all individually. Very interesting stuff
W3C XHTML spec? Monday, March 07, 2005
"Out of interest, is your HTML set to strict or transitional?"
Strict. Let me run a quick <i>test</i>...
Excellent - it looks like Joel is doing the Right Thing with submitted HTML; hopefully, this will appear as text, rather than turning into a rendered mess....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Test</title> </head> <body> <p> <img src="xyz.gif" height="1" width="2" alt="punt"> </body> </html>
The width and height attributes are not presentational in nature. They describe the content, not how to display it.
The *effect* of the width and height attributes is purely presentational, but then so is everything else in HTML.
comp.lang.c refugee Tuesday, March 08, 2005
"The width and height attributes are not presentational in nature. They describe the content, not how to display it."
Except that isn't really true either, is it? the height and width attributes don't tell the user agent what the size of the content is, they "tell user agents to override the natural image or object size in favor of these values". In other words, please scale the display. If they were descriptive, the expected behavior in the event of a discrepency would be to use the true dimensions of the content, rather than the attributes. Not, of course, that this sort of semantic dispute has any value at all, with regards to the original question raised. |
Powered by FogBugz


