Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-10-2009, 12:29 AM   PM User | #1
vicgui
New to the CF scene

 
Join Date: Dec 2008
Location: Hallandale Beach, FL
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
vicgui is an unknown quantity at this point
Question Background tag

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?
vicgui is offline   Reply With Quote
Old 05-10-2009, 12:53 AM   PM User | #2
RomanTaylor
Regular Coder

 
Join Date: Mar 2009
Location: Troutdale, OR
Posts: 145
Thanks: 12
Thanked 6 Times in 6 Posts
RomanTaylor is an unknown quantity at this point
Code:
<body style="background-image: url('C:\Documents and settings\Administrator\Desktop\web_site\Pictures\chalk.jpg');" />
Try it.
RomanTaylor is offline   Reply With Quote
Old 05-10-2009, 01:18 AM   PM User | #3
timgolding
Senior Coder

 
timgolding's Avatar
 
Join Date: Aug 2006
Location: Southampton
Posts: 1,460
Thanks: 89
Thanked 110 Times in 109 Posts
timgolding is on a distinguished road
Quote:
Originally Posted by vicgui View Post
<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.
__________________
You can not say you know how to do something, until you can teach it to someone else.
timgolding is offline   Reply With Quote
Old 05-10-2009, 04:39 PM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
<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
Code:
background:url('Pictures/chalk.jpg')
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:03 PM.


Advertisement
Log in to turn off these ads.