Background or img?

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 7th, 2006, 10:38
Up'n'Coming Member
Join Date: Aug 2006
Location: Suffolk
Age: 30
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 7th, 2006, 14:11
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 7th, 2006, 18:39
Reputable Member
Join Date: Dec 2005
Location: Texas
Age: 19
Posts: 328
Thanks: 0
Thanked 0 Times in 0 Posts
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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 7th, 2006, 20:03
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 7th, 2006, 20:47
Up'n'Coming Member
Join Date: Aug 2006
Location: Suffolk
Age: 30
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background or img?

Thank you for your answers.

I think it's much clearer in my head now.

Ruby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 8th, 2006, 01:19
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
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:

Code: Select all
<div style="width: 200px; height: 120px; background: #fff url('06gto.jpg') 0 0 no-repeat;">
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 8th, 2006, 14:19
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 9th, 2006, 07:22
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background or img?

Haha, we were just expounding on your correctness.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
css image

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 11:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved