css background question

st4rx

New Member
Messages
1
Reaction score
0
Points
0
Is it possible to use CSS to anchor a background image in a corner and tile it only the x or y direction?
 

xanthophobia

New Member
Messages
24
Reaction score
0
Points
0
Code:
<style>
body {
	background-image: url(URL_HERE); /* sets URL of background */
	background-position: top left; /* places background in corner (top|bottom) (left|right)*/
	background-attachment: fixed; /* anchors background */
	background-repeat: repeat-x; /* how you want the background to repeat (repeat-x|repeat-y) */
}
</style>
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
warning, if you want to place something in the bottom-right, or (bottom-left)not sure...you have to place

<style>
html {
height: 100%;
}
</style>

otherwise it will only expand to how much your body height takes up
 
Top