Haunted Mansion
09-14-2003, 08:14 PM
I saw on some site that the background image never repeats itself as you scroll down. What is the HTML code for this? Thanks!
|
View Full Version : Non Moving Background Image, How? Haunted Mansion 09-14-2003, 08:14 PM I saw on some site that the background image never repeats itself as you scroll down. What is the HTML code for this? Thanks! Lissa 09-14-2003, 08:19 PM Check out CSS (http://www.lissaexplains.com/css.shtml) . body { background: #000000; background-image: url(value); [url of background image to be used, i.e. background.gif] background-repeat: value; [repeat, no-repeat, repeat-x, repeat-y] background-position: valueI valueII; [valueI: top, center, bottom, percentage, pixel number] [valueII: right, center, left, percentage, pixel number] background-attachment: value; [scroll, fixed] } Haunted Mansion 09-14-2003, 08:25 PM Originally posted by Lissa Check out CSS (http://www.lissaexplains.com/css.shtml) . body { background: #000000; background-image: url(value); [url of background image to be used, i.e. background.gif] background-repeat: value; [repeat, no-repeat, repeat-x, repeat-y] background-position: valueI valueII; [valueI: top, center, bottom, percentage, pixel number] [valueII: right, center, left, percentage, pixel number] background-attachment: value; [scroll, fixed] } Hmmmm so can HTML and CSS go together? Soooo I did it and now my background page is white. Lissa 09-14-2003, 08:30 PM You have to make a style sheet (instructions are on that page) and include those body attributes in the sheet. You can choose to have the background image fixed, and tell the browser where to show the background on the page with the position attribute. Haunted Mansion 09-14-2003, 08:31 PM sorry im kinda stupid :( but this is what I have so far {background-image: url(http://www.hostultra.com/~missmccoy/Web%20Graphics/background.jpg); background-repeat: no-repeat;background-position: valueI valueII; [valueI: top, center, bottom, percentage, pixel number] [valueII: right, center, left, percentage, pixel number] background-attachment: fixed; :( Haunted Mansion 09-14-2003, 08:36 PM for value 1 and 2, do I put my dimensions of my background image? 1024x768? Sorry iam so confused. Lissa 09-14-2003, 08:42 PM body {background-image: url(http://www.hostultra.com/~missmccoy.../background.jpg); background-repeat: no-repeat; background-position: valueI valueII; [valueI: top, center, bottom, percentage, pixel number] [valueII: right, center, left, percentage, pixel number] background-attachment: fixed; } No, you just put it exactly where you want it in pixels. Haunted Mansion 09-14-2003, 08:42 PM Never mind I got it working. Thanks! Now my next task frames.... lol Lissa 09-14-2003, 08:45 PM Looks great =) Haunted Mansion 09-14-2003, 08:59 PM Originally posted by Lissa Looks great =) Thanks! :) |