WillumMaguire
WillumMaguire

Reputation: 547

Image stored in C:\ as background for html document

I have this nice little line of code

<html style="background-image:url(file:///C:\inetpub\wwwroot\lifehacks.png); background-repeat:repeat; background-attachment:fixed; overflow:scroll;">

I'm basically putting together a practice website to get used to html. When I had the background as a link to a website containing the image such as this

style="background-image:url(http://a0.twimg.com/profile_images/1381375879/lifehacks10.png)

It worked fine. I saved the image to my wwwroot folder, which contains my html documents. Why won't it display the image now?

Upvotes: 0

Views: 81

Answers (1)

Dan Barzilay
Dan Barzilay

Reputation: 4993

If the image is in the same folder as your html documents you can just do this:

<html style="background-image:url(lifehacks.png); background-repeat:repeat; background-attachment:fixed; overflow:scroll;">

Upvotes: 1

Related Questions