September 29, 200818 yr Hi, Im using wordpress to create my website, but are having problems uploading a background image for the site. I have the image I wanted to use in a folder called images, and the folder is on my desktop. the name of the image is "body-bg.gif". Here is the css.... /* RESET */ * { margin: 0; padding: 0; } html { overflow=y: scroll; } html, body { height: 100%; } body { font-size: 62.5%; font-family: arial, sans-serif; color: #272727; background-image: url(images/body-bg.gif) top center repeat-x white; } ul { list-style: square inside; } ol { list-style: decimal inside; } a { outline: none; text-decoration: none; } a img { border: none; } img { vertical-align: middle; } table { border-collapse: collapse; } thanks for the help!
September 30, 200818 yr body { font-size: 62.5%; font-family: arial, sans-serif; color: #272727; background-image: url(images/body-bg.gif) top center repeat-x white; } You need to have url('images/body-bg.gif') top center repeat-x; (I m referring to the ' ' around the file name) I don't think you can have the "white" in there with the image(?). I think it's one or the other(image or bg-color) maybe someone can clear that up. I'm no pro. You may also want to use em for font size instead of % so folks can re-size text. Hope that helped!
September 30, 200818 yr You don't need to have the quotes '' around the url. In your case, the problem is that you have specified background-image but have then used other background properties too. Instead use the background shorthand: background: #fff url(images/body-bg.gif) top center repeat-x; } Having a colour specified as well as a url is fine. This means that if the background image doesn't fill all of the element, the rest of the background will be the specified colour. Handy if, for example, you used white text over a background image. If the user has images disabled and the rest of the page is white, they won't be able to see your text. In this example you would specify the background colour as black so that users could still see your text with images disabled. Hope that makes sense. @racer x - Having the body font-size as 62.5% is common practice as it then means that 1em is roughly equivalent to 12px (I think or is it 10px?) You specify the body font-size in % and the rest of the page font-sizes in ems. This gives you some control over the size of your text. Text can be re-sized if it is specified in % or ems. IE has problems when fixed pixel sizes are used.
September 30, 200818 yr oops. Forgot in the shorthand format that you could do both image and color. (Sorry, web-rookie! I'll keep my mouth shut and remember that I'm learning here, too!) I just thought my info would help. Thanks for the great tip ElanMan about specifying the % and then em throughout site. Never knew that. This kind of help is exactly why I joined this forum! ps. GREAT article about the one day website on your site! I need to pass that along to clients "waiting" for their websites to appear like "magic"!
Create an account or sign in to comment