View Full Version : background help


cute_senorita
02-15-2005, 08:28 PM
hi, I'm a beginner, and therefore am very clueless. I'm trying to make a border with an image that goes all the way down the left margin of the page. I read in the CSS page that the code for this is:
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]

Now, I copied this in a page and replaced the "value" with my information, but does the image have to be from a url? cuz I made a drawing for this, so I put the filename instead. Should it still work or do I absolutely need to put a url? If yes then how can I get my drawing to appear on my page?

Monkey Bizzle
02-15-2005, 08:41 PM
well, if your website is www.page.com and you uploaded image.jpg to the main direcotory, then that line of your code should be:

background-image: url(image.jpg);

if you have a subdirectory called images that the picture is in, then the line would be:

background-image: url(images/image.jpg);

make sure that you uploaded the picture, and that it is linked correctly. if you don't get it, just post the URL to your page.

pb&j
02-15-2005, 08:46 PM
can you post a link to your page having the problems? thanks.

cute_senorita
02-16-2005, 09:03 PM
The page I'm trying to do this on is:
http://www.geocities.com/lil_cute_senorita/hp.html

All I have on that page right now is the image(which doesn't even show here) and the background repeat-y code. I did this first in a Notebook document and I could see the image but I can't on my website.

Monkey Bizzle
02-16-2005, 09:24 PM
well, i can see the image in both firefox and ie... but, the code should look like this:

<html>
<head>

<title>Untitled</title>

<style type="text/css">

body
{background-color: #000000;
background-image: url(http://www.geocities.com/lil_cute_senorita/lightningboltyellow.bmp);
background-repeat: repeat-y;}

</style>

</head>

<body>

</body>
</html>

cute_senorita
02-17-2005, 03:34 PM
well, I copy pasted what you wrote there, exactly was you wrote it, and it still doesn`t work... you can`t even see the image now (because before I had put the code for you to see the image I wanted to place) I don`t get it...

pb&j
02-17-2005, 04:09 PM
that is because this forum made the image url smaller.
try this instead...

body
{background-color: #000000;
background-image: url(http://www.geocities.com/lil_cute_senorita/lightningboltyellow.bmp);
background-repeat: repeat-y;}

and to note... BMP type images are a very large memory size. your same image can be made into a GIF type image which will be a faster loading page for your visitors. most image programs will allow you to change the image format types.

cute_senorita
02-17-2005, 04:17 PM
thank you so much, it worked!!!

pb&j
02-17-2005, 04:23 PM
no worries.
good luck!