[SOLVED] Background Images

This is a discussion on "[SOLVED] Background Images" within the Starting Out section. This forum, and the thread "[SOLVED] Background Images are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 27th, 2007, 16:09
New Member
Join Date: Oct 2007
Location: Angers, France
Age: 31
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Red face [SOLVED] Background Images

Hi. I'm very new to HTML (first couple of days) and am frustrated by something. I bet I'm misunderstanding something simple here! I can't seem to get a background image to show on my site. I've read a thread that answered a similar problem and literally copied the code but it still doesnt work. Can anyone reply with an 'idiots guide' to setting a background image? It would be simpler of this could be in the HTML document and not the CSS as I havent got to grips with CSS docs yet!

Could this be a problem with the URL for the image as this is the only difference between my code and that supplied on the various sites I've read? How should I write the URL and how can I be sure that it is correct?
Reply With Quote

  #2 (permalink)  
Old Oct 27th, 2007, 16:30
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Images

Try this for starters:

HTML: Select all
<head>
<style type="text/css">
body {background: url(http://www.domain.com/image.jpg) no-repeat top;}
</style>
</head>

<body>
</body>
Cheers,
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #3 (permalink)  
Old Oct 27th, 2007, 20:08
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Images

Could be a few things:

1) make sure the path is correct
2) if you are applying the background to a div, make sure you have a width and height
Reply With Quote
  #4 (permalink)  
Old Oct 28th, 2007, 06:01
New Member
Join Date: Oct 2007
Location: Angers, France
Age: 31
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Images

Quote:
Originally Posted by swagner View Post
Try this for starters:

HTML: Select all
<head>
<style type="text/css">
body {background: url(http://www.domain.com/image.jpg) no-repeat top;}
</style>
</head>
 
<body>
</body>
Cheers,
SWagner

SWagner - Thanks for getting back to me. I cut and paste the above code but still no luck. When I open the browser window I just get a blank page. Any other ideas?
Reply With Quote
  #5 (permalink)  
Old Oct 28th, 2007, 07:33
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,639
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Background Images

Did you change the url of the image to your image?
Reply With Quote
  #6 (permalink)  
Old Oct 28th, 2007, 13:48
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Images

Yes, Marc is right. The image in my code doesn't exist!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #7 (permalink)  
Old Oct 29th, 2007, 15:31
New Member
Join Date: Oct 2007
Location: Angers, France
Age: 31
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background Images

All,

Thanks I did change the URL but have since worked out that my browser settings were blocking the image!!!! I've sorted this out now and it is working. Thanks for your advice.

first time I've posted and it was nice to get soem quick responses.
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to have 2 background images? lmc148 Web Page Design 8 Jun 17th, 2008 01:46
[SOLVED] using background images in a list marisa Web Page Design 3 Nov 28th, 2007 12:55
[SOLVED] using background images to fill div's R8515198 Web Page Design 9 Sep 29th, 2007 21:05
Cant Get CSS background images to show up mschroeder Web Page Design 3 Jan 18th, 2007 13:33
Is it possible to have 2 repeating background images? dragonator Web Page Design 1 Dec 9th, 2005 00:09


All times are GMT. The time now is 21:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43