what is the code for sinking an image into a background where it dosen’t move, no matter how much you scroll up and down the page?
Is this for website or 3D Studio Max (BTW it would help if you placed this in the right forum so people could understand what you are talking about).
Sounds like a webpage to me…
What program are you using to code your page? or are you doing it yourself? if your doing it in a program theres a way threw the options, but i need to know what program you’re using. A little more information would be helpful.
I am hand coding it myself.
<body background=“IMAGE LINK HERE”>
If you want to use CSS instead:
<style>
body {
background: #123456 url(someimage.jpg) no-repeat fixed center;
}
</style>
will those keep the background image stationary as you scroll…I’m talking like the robotic website is.
Im not sure about mine, becuase i just gave you a basic code. From the looks of it the code that Greg posted should prevent it from moving. But when building your webpage it may become difficult in some areas to read the text, so whatch what you use as a picture.
The CSS code provided keeps it stationary, yes.
And yes you should watch out with using a background, make sure you can read over it, or if you’re using a picture its usually a good idea to play with it until the colors are relatively similar (less contrast, lighten/darken, etc).
thanks!
the CSS is not working…can someone rewrite it…mabye he made a mistake.
Make sure you put the <style> tags inside the <head> tags of your HTML file, and change #123456 to a real color and someimage.jpg to a real image. If the image isn’t in the same directory as the HTML file, make sure you include the correct filepath as well. That CSS should work.
It will not work. That does a repeating background that does scroll.
no-repeat fixed does a repeating background that is not fixed?
[quote=“Greg Marra”]
no-repeat fixed does a repeating background that is not fixed?
*(http://www.w3schools.com/css/tryit.asp?filename=trycss_background)
*
I meant her HTML.[/quote]
You can also add the attributes to the <body> tag:
bgproperties=“fixed”
OR
style=“background-attachment: fixed; background-image: url(relativeimageurl.jpg); background-repeat: no-repeat; background-color: #123456;”