[thelist] CSS Backgrounds: repeat-x width:100%

aardvark roselli at earthlink.net
Thu Mar 18 18:18:30 CST 2004


well, a width on the body will just make the body, well, wide... CSS1 
and CSS2 have no provision for scaling bg images....
http://w3.org/TR/CSS2/colors.html#background-properties

CSS3 wants to, but, well, not anytime soon...
http://w3.org/TR/2002/WD-css3-background-20020802/#background-size

if your image really tiles, but has edges of a solid color, let's 
say, then you can just tile your image all over the place and let 
your main container handle the color bars down the side with anything 
from a very wide colored border to some colored block-level 
elements...

so, if we could see what you're trying to do, perhaps we could offer 
some suggestions?

> From: Rob Smith <rob.smith at THERMON.com>
[...]
> Ive created a repeatable graphic designed for widths at 1024px.
> However, this is not good practice. I need it to be 100% and not a
> fixed width:
> 
> +-------------------------------------------+
> |////|                                 |\\\\|
> |////|                                 |\\\\|
> |////|                                 |\\\\|
> |////|                                 |\\\\|
> +-------------------------------------------+
> 
> I have in my CSS file:
> body {
> background-image: url(/grfx/webback.jpg);
> background-repeat: repeat-y;
> width:100%;
> }
[...]



More information about the thelist mailing list