Lefora Free Forum
10 views

mine

Page 1
posts 1–2 of 2
novice - founder
25 posts

Hi, itsmebkb.
The code for my current theme's background pic is :
body {
background-image:url();
background-position:top right;
background-repeat:no-repeat;
background-attachment:fixed;
background-color:#000000;
}

#page {background-color:transparent;}
the 'background-image' line sets the background (no surprise there) using a url of a hosted image. the image can be hosted elsewhere or within a post here on lefora (like the one above).
'background-position' can be either defined like above - top right, center center, bottom left, variations on those - or as percentages like 50% 75% - it all depends on where you want your image placed.
This one is placed in the top right - if you change the size of your browser window you'll see the pic stays in the same corner.
background-repeat - the options are :

  • repeat - the image will repeat to cover the screen
  • no-repeat - the image will not repeat
  • repeat-x - the image will be repeated along the x-axis
  • repeat-y - the image will be repeated along the y-axis
background-attachment:fixed - stops the image scrolling with the screen
after that, the page background colour is set to transparent so that it it doesn't cover the background.


Page 1
posts 1–2 of 2

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now