0

I wonder which one is better: adding header image with img src in html, or as a background in CSS.
Also, in source code I can specify alt (for accessibility).
I know IE6 has issues with transparent png.
What is your practice?

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by twiss
1

I always followed the idea that a html image would be good for logos etc, because you can place them in a link, so the user goes to the homepage when clicked.
A big banner across the screen, meant to be a background, should, IMO, be a css background image. You should be careful with though, I find tiles (repeating small images) are good for big banners, so you can then add detail on top of them, which often makes more sense.

Tiles also look good if you're using a fluid layout. Static images as backgrounds don't tend to work very well in fluids unless they are mega wide - so they get cropped as the screen size gets smaller.

Edited by diafol: n/a

0

If an image contains meaning, such as text, or is placed inside a paragraph to make something clear (i.e., it doesn't contain decoration) I would think it's better to use an img tag.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.