Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > CSS
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 08-28-2006, 01:37 PM
  #1
Skor
Veteran (Level 7)
 
Join Date: Jun 2006
Posts: 65
iTrader: (0)
Skor is an unknown quantity at this point
Images: Background image in CSS or Img Src?

I'm curious to know when I should be displaying an image as a background image in CSS vs. using the standard "src img" in HTML to display them.

Obviously, if you're gonna layer the images one on top of another, you'd use CSS. But for a simple image placement in a CSS-coded web site, what do the experts around here use?
Skor is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-28-2006, 01:40 PM
  #2
Disturbed
Rawr!
 
Disturbed's Avatar
 
Join Date: Dec 2005
Posts: 1,291
iTrader: (0)
Disturbed will become famous soon enough
Css. If it's a CSS-coded site. It is simplier, and cleaner coding. ( I'm not an expert )
Disturbed is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-28-2006, 01:46 PM
  #3
StijnSpijker
Novice (Level 1)
 
Join Date: Aug 2006
Posts: 3
iTrader: (0)
StijnSpijker is an unknown quantity at this point
Quote:
Originally Posted by Skor
I'm curious to know when I should be displaying an image as a background image in CSS vs. using the standard "src img" in HTML to display them.

Obviously, if you're gonna layer the images one on top of another, you'd use CSS. But for a simple image placement in a CSS-coded web site, what do the experts around here use?
If it's a background image : Use the CSS attribute,

If it's a normal image, use the <img> tag...

Sounds pretty easy to me
StijnSpijker is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-28-2006, 03:01 PM
  #4
coothead
~ bald headed old fart ~
 
coothead's Avatar
 
Join Date: Aug 2003
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 8,391
iTrader: (0)
coothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud ofcoothead has much to be proud of
Hi there Skor,

I prefer to use background-image wherever possible, as it means less mark-up.
__________________
coothead is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-28-2006, 03:12 PM
  #5
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,368
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
I rarely have a background image any more, but when I do, it's in the CSS, not in the page.

Peg
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 08-29-2006, 07:14 AM
  #6
RysChwith
Super Guru
 
Join Date: Jun 2004
Posts: 4,162
iTrader: (0)
RysChwith will become famous soon enough
Use the <img> tag when it's actual content, like a graph or illustration, but CSS when it's decoration.

Basically, think of it this way: if the user were unable to see the site and someone were reading it to him, which graphics would that person bother to mention? Those should be your <img> tags.

Rys
RysChwith is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart



 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 09:13 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.