HighDots Forums  

Re: <img> or CSS background-image?

alt.html alt.html


Discuss Re: <img> or CSS background-image? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy Dingley
 
Posts: n/a

Default Re: <img> or CSS background-image? - 10-02-2006 , 06:14 AM







JWL wrote:

Quote:
Anyway, using a CSS layout, I left-floated the four divs and placed
img> tags in them to display the images. But now I'm thinking: would it
be better to place background images in the divs using CSS?
The fact that you can place background images through CSS is no
indication that you ought to. The notion that you can apply CSS
rollovers to them isn't a good recommendation either.

CSS only supports "background" images, not foreground. The useful
behaviours that emerge from this (such as rollovers) don't change the
fact that it's primarily a background feature. It's definitely a
mistake to start treating this as a primary way of distributing real
content. Stick with <img>.

For one simple example, general default behaviour on printing is to not
print CSS background images. This is such a useful feature (because of
excess eye candy) that it's impractical to change this setting. So if
you want your images to be printable, then don't stick them through CSS
backgrounds.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.