HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Background Image Compatibility
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
oliapolo



Joined: 10 May 2008
Posts: 1

PostPosted: Sat May 10, 2008 11:10 am     Background Image Compatibility Reply with quote

The page was tested using Firefox.
I can't get the background image (background color works fine) to show up in either IE or Safari.

What am I doing wrong?

(It doesn't have to be written with CSS, if that helps):

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<script language="JavaScript">window.resizeTo(1200,900)</script>
<style type="text/css">

body
{font-family: Century Gothic; background-color: rgb(199, 188, 171); color: rgb(0, 0, 0); background-image: url(IMAGES/BGLionSarc.jpg);}


<title>Antiquities</title>
</style>
</head>
quartzy



Joined: 26 Dec 2007
Posts: 369

PostPosted: Sat May 10, 2008 2:07 pm     re Reply with quote

I can see that you have entered two colours for the background one of which is black.
sticks464



Joined: 31 Dec 2006
Posts: 837

PostPosted: Sat May 10, 2008 8:45 pm     Reply with quote

This is how your page should look

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Antiquities</title>
<script type="text/JavaScript">window.resizeTo(1200,900)</script>
<style type="text/css">
body {
font-family: Century Gothic;
background: rgb(199, 188, 171) url(images/BGLionSarc.jpg);
color: rgb(0, 0, 0);
}
</style>
</head>


Make sure your path and spelling are correct for the image
Straystudio



Joined: 14 Apr 2008
Posts: 182
Location: Nord Italy

PostPosted: Sat May 10, 2008 9:04 pm     Reply with quote

Code is right
( apart from <title>Antiquities</title> needing to be pulled out from STYLE tags ).

Problem may have to do with file storage: I see the filepath calls a sub-folder.
This mean, where (directory) You saved the Document.html, You should find further an IMAGES folder; opening which, You find the BGLionSarc.jpg file of image.
NOT to find Document.html and BGLionSarc.jpg together showing cool in the same Open File dialog box.

By the way, You may not have the "bare" Document.html there; You might have it stored in a folder (say it: HANDLERS), this folder indeed appearing together with the other IMAGES folder.
If so, do so:

background-image: url(../IMAGES/BGLionSarc.jpg);

dot-dot-slash makes the Browser moving one level back to find files, into the upper Directory containing both HANDLERS and IMAGES Directories.

As the last (better: at first) You may enter the absolute URL in place of IMAGES/BGLionSarc.jpg relative URL to test.
sticks464



Joined: 31 Dec 2006
Posts: 837

PostPosted: Mon May 12, 2008 4:32 am     Reply with quote

Quote:
Straystudio
Code is right

I have to differ with you that code is correct.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
is an incomplete doctype. It has nothing to do with the problem, however members should be reminded to use a complete doctype to avoid display errors in modern browsers.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial