[thelist] CSS background-position property not working

Emma Jane Hogbin emmajane at xtrinsic.com
Wed Feb 26 15:06:01 CST 2003


On Wed, Feb 26, 2003 at 04:36:17PM -0400, Sarah wrote:
> At 2/26/2003 01:38 PM, you wrote:
> >I have been trying to get my portfolio site to look right, and for some
> >reason the CSS "background-position" property doesn't seem to be working
> >properly. The site is <http://sarah.designshift.com/> - I am trying to have
> >left side be orange, which is the background colour, and have the rest of
> >the page have the blue stripes image as the background. Here is my body
> >definition:
> >body
> >{ font-family: sans-serif;
> >  font-size: 90%;
> >  background-color: #ff9900;
> >  background-image: url("images/stripes.gif");
> >  background-position: 12.5em 0em;
> >  color: white;
> >}

I missed this the first time around...How was the background image not
positioning correctly? Was it simply not leaving a space on the left for
the orange navigation? In theory you could put the stripes into thecontent div
instead of trying to move the background colour over. Of course you're
going to have problems in the browsers that don't respect body set to 100%
and divs set to 100% for the full height effect (which is a mouthful but
hopefully makes sense).

I was just playing around with it and I couldn't get it to move over
slightly politely either. I've always stuck to the "top left" or "bottom
right" stuff... I'd recommend setting background-position: fixed, but it's
not going to help with people who have high resolutions and maximized
browsers. The only other site I've got up right now with background images
is www.salzmann.com (original design is not mine). My favorite page is the
Aquatic Massage Therapy page.

I'd also add a padding-right to your thecontent div. The words feel all
squished against the ride side of the page.

emma

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



More information about the thelist mailing list