Login | Register | FAQ
Anonymous

Problem With Background Images

+ Post a reply

5 posts Page 1 of 1


Problem With Background Images

by David.G » Fri Jul 22, 2011 11:20 pm

I was reading the HTML tutorial of CSSS and I came across this code:

<body style="background-image: url('http://www.html.net/logo.png');">

This is very good for taking an image off a website but what if I want to add an image from a folder. What command would be used then?

Thanks in advance for the help:)
User avatar

David.G

  • Posts: 3
  • Joined: Wed Jul 20, 2011 10:51 am

Re: Problem With Background Images

by HTML.net » Sat Jul 23, 2011 7:04 am

Hi David,

Just like this:

background:url('/site/graphics/logo.png');

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1184
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: Problem With Background Images

by chrisf1288 » Mon Jul 25, 2011 4:03 am

ya. an easy way to find the url of the pic in one of your folders is to view the pic in your browser then just copy thet url. thats what i do
User avatar

chrisf1288

  • Posts: 128
  • Joined: Sun Jun 26, 2011 1:01 am

Re: Problem With Background Images

by rustynuts8 » Fri Sep 16, 2011 11:46 am

As long as your image is saved in the same location as your html file the following example should work fine:
<body background="name of image.jpg">

or .png/gif etc.
User avatar

rustynuts8

  • Posts: 3
  • Joined: Fri Sep 16, 2011 11:38 am

Re: Problem With Background Images

by oliviasmith » Wed Sep 21, 2011 5:48 am

Hey Hello,
there is a simple solution for you, you can call image in your designing page or you can take path which is in your desktop for your image.it will work 100%.
User avatar

oliviasmith

  • Posts: 4
  • Joined: Wed Sep 21, 2011 5:13 am


+ Post a reply

Page 1 of 1