beckymcd Posted March 12, 2006 Posted March 12, 2006 I'm sure this is a repeat question, but I can't find the answer I'm looking for. :huh: I have my store centered on the webpage and I want to add a background image, not a color, to the white space on either side of it. The only information I've found is for table background. I used Vger's CSS Stylesheet code for centering. Any help will be appreciated. Thanks, Becky
rabbitseffort Posted March 12, 2006 Posted March 12, 2006 add the css code for the background image in the stylesheet under the body styles, like so: background-image: "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey"
spax Posted March 12, 2006 Posted March 12, 2006 Plus the URL body { background-image: url('images/bg_image.gif'); }
beckymcd Posted March 13, 2006 Author Posted March 13, 2006 Plus the URL body { background-image: url('images/bg_image.gif'); } Thank you for the information. However, I'm not sure where to put it. Do I put it in the section I've copied below from my stylesheet_css, or use it to replace some of the code that's in there? Sorry for the questions, I'm trying to learn all this stuff. :blush: Thanks, Becky BODY { text-align: center; background: #ffffff; color: #000000; margin: 0px; } .fixcenter { width: 758px; border: solid; border-width: 1px; background: #ffffff; color: #000000; margin: auto; margin-top: 50px; text-align: left; } A { color: #000000; text-decoration: none; } A:hover { color: #AABBDD; text-decoration: underline; }
spax Posted March 13, 2006 Posted March 13, 2006 Yeah Becks, just add it to your Body style. Plus if you dont want the image tiling (repeating), you can add: background-repeat: no-repeat; If you want to position the background image add: background-position: top left; Or: background-position: 10px 10px; (which is 10px from the top and left) All together it will be: BODY { text-align: center; background: #ffffff; background-image: url('images/bg_image.gif'); background-position: top left; background-repeat: no-repeat; color: #000000; margin: 0px; } You can write a shorter version of that, but this way you'll understand what is doing what.
beckymcd Posted March 14, 2006 Author Posted March 14, 2006 Yeah Becks, just add it to your Body style. Plus if you dont want the image tiling (repeating), you can add: background-repeat: no-repeat; If you want to position the background image add: background-position: top left; Or: background-position: 10px 10px; (which is 10px from the top and left) All together it will be: BODY { text-align: center; background: #ffffff; background-image: url('images/bg_image.gif'); background-position: top left; background-repeat: no-repeat; color: #000000; margin: 0px; } You can write a shorter version of that, but this way you'll understand what is doing what. Spax, thank you so much! I actually have a small graphic that needs to be tiled, so I think I would just do this: BODY { text-align: center; background: #ffffff; background-image: url('images/bg_image.gif'); color: #000000; margin: 0px; } I'm assuming repeat is the default so I don't need to put in background-repeat: part. I'll try it now. Thanks again, Becky :P
rabbitseffort Posted March 14, 2006 Posted March 14, 2006 yes that is right--it will repeat that way--any more questions? Fire away! "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.