Newby newb question on using image

This is a discussion on "Newby newb question on using image" within the Web Page Design section. This forum, and the thread "Newby newb question on using image are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 17th, 2007, 10:19
New Member
Join Date: Jul 2007
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Newby newb question on using image

Hi,

I'm new to stylesheets so keep with me....


I have avery simple external stylesheet:


HTML: Select all
body
{ 
background-image: 
url('images/banner_flat.jpg');
background-repeat: 
no-repeat;
background-position: 
 center; 
}
first { color: blue; } 
h3{ color: white; }
Then in an even simplet html page I have

HTML: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<link rel="stylesheet" type="text/css" href="head2toe.css">
</head>
</html>
But alas no background image is being displayed, any ideas where I am going wrong?

Thanks,


G
Reply With Quote

  #2 (permalink)  
Old Jul 17th, 2007, 10:31
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newby newb question on using image

Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<head>

<link rel="stylesheet" type="text/css" href="head2toe.css">

</head>



</html>
Yup, you've got no body! and therefore nowhere to apply the styles to!

And because there is no body there is no h3 so that style isnt being applied.

Try this...


Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<head> 
<link rel="stylesheet" type="text/css" href="head2toe.css"> 
</head> 

<body>

<h3>This should have the h3 style applied to it!</h3>

</body>

</html>
Reply With Quote
  #3 (permalink)  
Old Jul 17th, 2007, 10:36
New Member
Join Date: Jul 2007
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newby newb question on using image

Ah!

Ok so I have added that, but still no background image. The images is stored in the images directory which I have no reference to, but I would have thought that IE would ouput some kind of broken image identifier?

Thanks for your help,

G
Reply With Quote
  #4 (permalink)  
Old Jul 17th, 2007, 11:23
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newby newb question on using image

what is the url of the website?

if you type in....your url/images/banner_flat.jpg

you should see the image on its own, if you don't your not linking to the right place for the image.

send us the url of the site and we can have a look...
Reply With Quote
  #5 (permalink)  
Old Jul 17th, 2007, 11:56
New Member
Join Date: Jul 2007
Location: UK
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newby newb question on using image

ah worked it out, I think I will be ok from here.

Cheers,

G
Reply With Quote
  #6 (permalink)  
Old Jul 17th, 2007, 12:39
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newby newb question on using image

cool

glad you got it sorted

Mike
Reply With Quote
Reply

Tags
external stylesheet linking

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
Image Problem in HTML-newb question partyon Web Page Design 2 Jun 6th, 2008 00:18
Newby here kathy Introduce Yourself 3 Feb 1st, 2008 01:15
Image Change Question adz13091982 Starting Out 3 Apr 28th, 2007 09:17
Total newb question....soryy!! lydian Web Page Design 8 May 28th, 2005 14:58
image as hyperlink question bklcomputing Web Page Design 2 May 20th, 2005 06:56


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


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