[thelist] CSS background-position property not working

Emma Jane Hogbin emmajane at xtrinsic.com
Wed Feb 26 17:45:00 CST 2003

On Wed, Feb 26, 2003 at 05:15:36PM -0400, Sarah wrote:
> >#bg
> >{
> >  width:100%;
> >  margin-left:100px;
> >  background-image: url("images/stripes.gif");
> >}
> I had thought of doing this, but then the div, being set to 100% width,
> makes a horizontal scrollbar appear, which I wanted to avoid.

In CSS-2 width=100% PLUS margin-left=100px results in sideways scrolling.
(IE5 counts the width property incorrectly for CSS1+CSS2. It counts the entire "box" of
the box model and therefore the above CSS would display as described in IE5.)

IF you were willing to count everything in percentages you'd probably be ok:
	width: 60%;
	margin-left: 30%;
	padding-right: 5%;
(with a bit left over for slop factor)

Instead of doing the margin-left you /could/ do absolute positioning and
then move it left: 100px (away from the left hand side of the page).

has some good pictures but as you'll notice none of the boxes stretch the
full height in all browsers (read: my browser).

There's also:
Somewhere there's a link to a three column layout that stretches all the
way down and "works" in Netscape 4 (I haven't tested it though).

Here's the one I was looking for
gleaned from:

Maybe that'll help. :)


Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]

More information about the thelist mailing list