English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What is usually the right css syntax when you want to insert a background that's in your own computer? I mean, the syntax would usually go like "background-image:
url('C:\Documents and Settings\admin.ADMIN-0BFEA6320\Desktop\Project\backgroundHP.jpg');
background-repeat: repeat"

that but the background wouldn't appear! However, if I put the image in photobucket and use the photobucket instead, the background will appear. I want to know what's the right syntax/link for the css background, and no, I CANNOT put it in photobucket for serious testings, its really not an option so don't tell me to just upload it in photobucket.

2006-11-30 13:27:53 · 2 answers · asked by Galadriel 3 in Computers & Internet Programming & Design

2 answers

The photo needs to be uploaded to your web server or you can add via a link to another web server (like PhotoBucket's) where it is hosted. If its on your web server, you can use a relative path from the CSS document.

background: #ffffff url(images/my_background.jpg) top left no-repeat;

Or on another web server, you can use an absolute path:

background: #ffffff url(http://www.xyz.com/img/bckgd.jpg) top left no-repeat;

2006-11-30 15:14:51 · answer #1 · answered by Chris B 4 · 0 0

Unless your computer has a static IP address, you can't do it.

If, however, you are lucky enough to have a specific IP address you would use the IP address to your machine followed by the file location (I would put it directly on the C: drive to make it easier on you).

BTW, unless you are using your computer as a web-server or are paying an exorbitant amount of money for your internet connection, you probably do not have a static IP address.

Instead of photobucket, you could try imageshack.

2006-11-30 21:33:49 · answer #2 · answered by Chris S 5 · 0 0

fedest.com, questions and answers