 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
oliapolo
Joined: 10 May 2008 Posts: 1
|
Posted: Sat May 10, 2008 11:10 am Background Image Compatibility |
|
|
|
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: 404
|
Posted: Sat May 10, 2008 2:07 pm re |
|
|
|
| I can see that you have entered two colours for the background one of which is black. |
|
sticks464
Joined: 31 Dec 2006 Posts: 993
|
Posted: Sat May 10, 2008 8:45 pm |
|
|
|
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: 238 Location: Nord Italy
|
Posted: Sat May 10, 2008 9:04 pm |
|
|
|
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: 993
|
Posted: Mon May 12, 2008 4:32 am |
|
|
|
| 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. |
|
|
|
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
|
|
|
|
|
 |
|
|
|
|
|
|
|