View Full Version : background positioning


aniephalcon
07-15-2003, 09:08 PM
I'm trying to get my background of a part of my layout to be 20 px from the right, however it doesn't seem to be working...

<style type="text/css">
body {background-image: url(rainbowbackground.gif); background-repeat: repeat-y; background-position: right 200px;}
</style>
what's wrong with my code?

sisqoluv
07-15-2003, 09:30 PM
I think it maybe the right you put into your code? I don't know...


<STYLE TYPE="text/css">
<!--
BODY {background-image: URL(rainbowbackground.gif);
background-position: 105 0;
background-repeat: no-repeat;
background-attachment: no;}
-->
</style>


105 is how far it is from the left. 0 is how far it is away from the top.

MaGiCSuN
07-15-2003, 09:57 PM
on lissa's css page you see this:

valueI valueII; [valueI: top, center, bottom, percentage, pixel number]
[valueII: right, center, left, percentage, pixel number]

valueI should be top,center bottom or any percentage or number. ValueII could be right. You had right on the wrong place, so try switching it i'm not sure though.

maybe this helps:


<STYLE TYPE="text/css">
<!--
BODY {background-image: URL(rainbowbackground.gif);
background-position: 20 right;
background-repeat: no-repeat;
background-attachment: no;}
-->
</style>

i'm not sure though, otherwise try to play a bit with the number 20

Love,
Mirna