![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm in the practice of specifying img width and height in my style definitions, although I usually use the actual size of the image. I'm reworking the style and it would be convenient to leave image size unspecified unless I need to change its dispayed size. What, if any, are the reasons why an image size should be specified in a stylesheet if it will be displayed in its actual size? |
#3
| |||
| |||
|
|
I'm in the practice of specifying img width and height in my style definitions, although I usually use the actual size of the image. I'm reworking the style and it would be convenient to leave image size unspecified unless I need to change its dispayed size. What, if any, are the reasons why an image size should be specified in a stylesheet if it will be displayed in its actual size? |
#4
| |||
| |||
|
|
I'm in the practice of specifying img width and height in my style definitions, although I usually use the actual size of the image. I'm reworking the style and it would be convenient to leave image size unspecified unless I need to change its dispayed size. What, if any, are the reasons why an image size should be specified in a stylesheet if it will be displayed in its actual size? |
#5
| |||
| |||
|
|
On Thu, 05 Aug 2004 13:46:28 GMT, Haines Brown brownh (AT) teufel (DOT) hartford-hwp.com> wrote: I'm in the practice of specifying img width and height in my style definitions, although I usually use the actual size of the image. I'm reworking the style and it would be convenient to leave image size unspecified unless I need to change its dispayed size. What, if any, are the reasons why an image size should be specified in a stylesheet if it will be displayed in its actual size? By omitting the height and width of an image in the HTML, the browser cannot leave sufficient space for the image when the page is rendered before the image is downloaded. As a result, the visitor experiences distracting and annoying jumping around while the image loads. I do not think it's wise to leave this out of the HTML. Perhaps there is a PHP solution where the image element is generated based upon the properties of the image to be included, |
#6
| |||
| |||
|
|
Haines Brown wrote: I'm in the practice of specifying img width and height in my style definitions, although I usually use the actual size of the image. I'm reworking the style and it would be convenient to leave image size unspecified unless I need to change its dispayed size. What, if any, are the reasons why an image size should be specified in a stylesheet if it will be displayed in its actual size? Because the image may be downloaded after the main content. By specifying the size, the browser knows how much space to leave for it. Why not put it in the <img> tag? I don't see that as presentational markup - it is a property of the image file. |
#7
| |||
| |||
|
|
"Neal" <neal413 (AT) yahoo (DOT) com> wrote in message news psb9lo8ku6v6656 (AT) news (DOT) individual.net...I do not think it's wise to leave this out of the HTML. Perhaps there is a PHP solution where the image element is generated based upon the properties of the image to be included, The browser doesn't interpret HTML differently depending on whether it's hard-coded or generated by server-side code. |
![]() |
| Thread Tools | |
| Display Modes | |
| |