Topic: xhtml img query (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24512" title="Pages that link to Topic: xhtml img query (Page 1 of 1)" rel="nofollow" >Topic: xhtml img query <span class="small">(Page 1 of 1)</span>\

 
JKMabry
Maniac (V) Inmate

From: raht cheah
Insane since: Aug 2000

posted posted 12-27-2004 21:19

Most web sites I've built lately don't really have any images in the pages, except for within the flow of the main page content...

I've been finding myself, while in developmenet stages, inserting the bare minimium IMG tags, that is src and alt, to facilitate image changes/flexibility. For example, if I decide to edit an image's size I don't have to go back into the markup and change those attributes for it to immediately display properly; I find that quite handy!

Used to be conventional wisdom to specify width and height in an image tag to keep the page layout from jumping around as the page loads. However, I find myself very tempted in these days of broadband and layouts inthe stylesheet, to start leaving the size attributes out altogether to give an extra measure of flexibility/ease of update.

I was not seing a problem with this at all and pretty much decided to start doing it. Then I printed a page =[ The print stylesheet worked right as rain but the image in the flow of text, that I was tryin to include on the printed version, did not print. I tried adding the attributes and that did it, printed fine (IE6 winXP).

Long way to go for a question but... anyone have any thoughts on pros and cons of specifying/not specifying those attributes? And more importantly, for my edumacation, is there any way around this printing snafu I've run into, that is, can I print images (<img />'s) without specifying the width and height attibutes?



(Edited by JKMabry on 12-27-2004 21:20)

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 12-27-2004 23:30

Well, the pros, of course, is that the browser can allocate space for the image before it is downloaded, which means that the text will not jump around when the image gets displayed.
The cons is that when those attributes are declared for small images, the alt text gets chopped in IE, and maybe other browsers too (it's possible to override this in IE though under Settings > Advanced).

The print problems, I've never heard of, and it works fine for me (also WinXP IE6). Does it work without those attributes if you remove the print stylesheet?

(Edited by HZR on 12-27-2004 23:35)

JKMabry
Maniac (V) Inmate

From: raht cheah
Insane since: Aug 2000

posted posted 12-28-2004 01:36

hmm, come to think of it I'm fairly certain it printed the attributeless image fine before I put the print stylesheet in.

that doesn't make sense to me, I'll have to do some serious fiddling here...

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 12-28-2004 14:50

If possible, please post the code, I'm interested in what the problem is.

JKMabry
Maniac (V) Inmate

From: raht cheah
Insane since: Aug 2000

posted posted 12-28-2004 21:22

I've taken te day ff to visit a friend but I definitely will do! Should be interesting to figure out how/what I scrood up

JKMabry
Maniac (V) Inmate

From: raht cheah
Insane since: Aug 2000

posted posted 01-01-2005 01:35

I cannot say what happened, but I can say it ain't happenin no mo. Weird stuff. I was printing at draft quality grayscale and I wondered if I may have slipped and told it not to print images but I really don't think that's the case.

I thank you for your time and bid you a happy New Year



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu