...

View Full Version : Background tag



vicgui
05-10-2009, 12:29 AM
I'm learning HTML/XHTML from a book and now I'm trying to insert a background and I can't get it to work this is the tag I'm using:

<body style="background-image:"C:\Documents and settings\Administrator\Desktop\web_site\Pictures\chalk.jpg" />

for some reason this does not work, can someone help me?

RomanTaylor
05-10-2009, 12:53 AM
<body style="background-image: url('C:\Documents and settings\Administrator\Desktop\web_site\Pictures\chalk.jpg');" />
Try it.

timgolding
05-10-2009, 01:18 AM
<body style="background-image:"C:\Documents and settings\Administrator\Desktop\web_site\Pictures\chalk.jpg" />


Is that some code you made up or is the book telling you to put that? If the book has quoted that code then I would chuck that book in the bin and start again.

abduraooft
05-10-2009, 04:39 PM
<body style="background-image:"C:\Documents and settings\Administrator\Desktop\web_site\Pictures\chalk.jpg" />
Anyway that path is of Windows and can't be used in a webpage as it needs a *NIX like path.

If your html page is located in the web_site directory, use a relative path like

background:url('Pictures/chalk.jpg')



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum