This is a discussion on "Background or img?" within the Web Page Design section. This forum, and the thread "Background or img? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Background or img?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Background or img?
Hi
I'm confused as to when I should use a image as a background and when I should declare it as an img in html. On my home page I have the navigation bar and then one large image of the artist's work. Currently I have this image as the background, but I am aware that if the image fails (eg as it does when I call up the page on my mobile) then there is no alt text and just a big blank space. Thanks, Ruby |
|
|
|
#2
|
|||
|
|||
|
Re: Background or img?
Depends what your needs are. I use background: for layout elements and <img> for images most of the time.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Last edited by moojoo; Nov 7th, 2006 at 20:05. |
|
#3
|
|||
|
|||
|
Re: Background or img?
Backgrounds are good if your going to writing over it in html. An image is good if its going to be a stand alone. ex.. logos, products, yadda yadda.
<quote>Depends what your needs are. I use background: for layot elements and <img> for images most of the time.</quote> |
|
#4
|
|||
|
|||
|
Re: Background or img?
Basic rule of thumb is to use background images, where you can, for images that are decorative.
Use the img tag for images that are part of what an end-user visits your site for. As you have pointed out, it is essential to have an alt text at the very least. If images are a main feature of the site as on an art related site, then you need much more than these to allow for people using assistive technologies. |
|
#5
|
|||
|
|||
|
Re: Background or img?
Thank you for your answers.
I think it's much clearer in my head now. Ruby |
|
#6
|
||||
|
||||
|
Re: Background or img?
Yeah, I agree with what ukgeoff said. If it's part of a site's design, use a background image (although I've seen just logos as images which doesn't bother me as long as there's an h1). If you've got an article about cars, you certainly don't want to do one of these:
|
|
#7
|
|||
|
|||
|
Re: Background or img?
Thats what I said damnit.. heh I am always getting shafted by you lot!
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#8
|
||||
|
||||
|
Re: Background or img?
Haha, we were just expounding on your correctness.
|
![]() |
| Tags |
| css image |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Background | Oak | Graphics and 3D | 12 | Mar 2nd, 2008 01:37 |
| Background | alexgeek | Graphics and 3D | 10 | Oct 22nd, 2007 01:04 |
| Background in a div | casho | Web Page Design | 28 | Aug 15th, 2007 20:24 |
| Div tag background help! | davor2000 | Web Page Design | 7 | May 28th, 2007 23:55 |
| Background and Resolution compatibility, My background gets cut off | Funion | Web Page Design | 1 | Dec 4th, 2005 05:42 |