469,290 Members | 1,754 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

How are images best set as <div> background?

Just looking for the best way to set an image to fill a <divcontainer as a
background without upsetting HTML/CSS validation...

Thanks in Advance...

--
Timothy Casey GPEMC! >11950 is the nu****@fieldcraft.biz 2email
Terms & conditions apply. See www.fieldcraft.biz/GPEMC
Discover valid interoperable web menus, IE security, TSR Control,
& the most advanced speed reading application @ www.fieldcraft.biz
Aug 27 '06 #1
4 8200
"Number 11950 - GPEMC! Replace number with 11950"
<nu****@fieldcraft.bizwrote:
>How are images best set as <divbackground?
Note that the widespread practice of coding images as CSS background
images is mostly misguided. If like many you have been "inspired" by CSS
ZenGarden, note that their coding practices result from a fundamental
flaw in their methodology, the resulting coding should not be emulated.

Coding images as CSS background images thwarts two types of essential
and/or basic functionality:

1) Non decorative images should be substituted by appropriate alt
content if a UA does not process images.

2) For decorative images the screen space occupied by images should be
freed up if a user has images disabled and CSS enabled.

--
Spartanicus
Aug 27 '06 #2
On Sun, 27 Aug 2006 12:12:20 +1000, "Number 11950 - GPEMC! Replace
number with 11950" <nu****@fieldcraft.bizwrote:
>Just looking for the best way to set an image to fill a <divcontainer as a
background without upsetting HTML/CSS validation...
Take note of what Spartanicus says. Assuming it's really a background,
then use CSS, e.g:

#mydiv {background: url(paper.jpg) #FFF8E8; color:black; }

where the background colour specification is an appropriate colour to
use if the image is not loaded.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Aug 27 '06 #3
Number 11950 - GPEMC! Replace number with 11950 wrote:
Just looking for the best way to set an image to fill a <divcontainer as a
background without upsetting HTML/CSS validation...

Thanks in Advance...
Just be sure that the background does not interfere with reading text.
In general, background images should be similar to a watermark created
by Word: transparent and light.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
Aug 27 '06 #4
Sym

Spartanicus wrote:
Note that the widespread practice of coding images as CSS background
images is mostly misguided. If like many you have been "inspired" by CSS
ZenGarden, note that their coding practices result from a fundamental
flaw in their methodology, the resulting coding should not be emulated.
Out of interest, what is the fundamental flaw in their methodology ?
rgds
Symeon.

Sep 1 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Nikolai Onken | last post: by
2 posts views Thread by Richard Maher | last post: by
nathj
5 posts views Thread by nathj | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.