PDA

View Full Version : background-position issues.



MisturMan
29-01-2010, 06:35 PM
Hey. I need to set my background position and it's pretty easy if I make sure the background is unrepeated, however I need the background to "repeat-y".

Every time I set the position it just springs to the top, is there any efficient way of repeating a background and setting its position?

e.g:

I want to set the position of the background to 50px down with:
background-position: 0 50px;

If I now change background-repeat to:
background-repeat: repeat-y;

it then goes across the whole div, whereas I need to to repeat from 50px downwards.

MisturMan
29-01-2010, 09:00 PM
I dont mind using javascript if theres a way to do it that way, I just need to find a solution.

edit:
Searched around for a bit and it seems there is no solution. :(

Colin-Roberts
29-01-2010, 09:26 PM
css..

body {
background:url(images/bg.png) repeat-y;
margin-top: 50px;
}

MisturMan
29-01-2010, 10:16 PM
That wouldn't be the solution. I've already got a background image and adding a margin to the top wouldn't help anything.

Colin-Roberts
30-01-2010, 07:53 PM
instead of doing it as background you could do it as a div...

MisturMan
30-01-2010, 10:48 PM
then how do I add another background? :D

MisturMan
30-01-2010, 11:34 PM
then how do I add another background? :D

Ignore this. I've worked out how to do it, thanks!

Want to hide these adverts? Register an account for free!