-
A little help please?
I'm in the process of making my new site and i've found an awesome background image to use. However, when a page expands beyond the image size, it repeats and it looks rubbish.
Does anyone know the script/coding that holds the background in place but lets the layout scrolls on top of it? I appreciate any help you can give.
-
need to edit the css to make it fixed somthing like backround:} fixed that isnt it but :P
-
Code:
<style type="text/css">
<!--
body {
background-image: url(url to ur bg pic); background-repeat: no-repeat; background-attachment: fixed;
}
-->
</style>
put that in head section
-
Use CSS :)
In head
HTML Code:
<style type="text/css">
<!--
body{background: url(PATH TO BACKGROUND); background-attachment:fixed;}
-->
</style>
Edit: Hoax bet me to it :(
-
mrcraig, add in the "background-repeat: no-repeat;" lolol :)
-
yeah, but surely if the attachment is fixed, it wont matter if it repeats or not?
-
-
LOL, nps :P
I was thinking about adding when coding then though "Nah, wont waste some bytes on it"
+REP for making a point :)
-
HTML Code:
<style>
body
{
background: url('path/to/image') fixed no-repeat;
}
</style>
-
Thank you for all your help guys, but when I tried using them, they either didn't work or would only show the one image and it didn't cover the whole screen. Am I doing something wrong? xD