Click to See Complete Forum and Search --> : <body> background image not rendering


SpenceQ
01-28-2009, 07:57 AM
Hi folks:

Got a background not rendering.

The pic is a 1.5 X 1.5in gif that I want to tile.
Here is the code. I placed "img src" code in to show that this works, so I know the directory is recognized. Both pics are in the same directory. I'm using the 1St Page editor, which doesn't preview the background and neither does IE and FF3.

.............................................................................................
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.7 [en]C-SYMPA (Win98; U)
[Netscape]">
<title>justice</title>

</head>

<body background="bcc.gif">

</body>
<img src="hdr2.gif" ALT="Page hdr2"><p>
</html>
.........................................................................................

Thanks for the help.

Spence

TheBearMay
01-28-2009, 08:20 AM
Insert this in your head section and eliminate the background in the <body>:


<style type="text/css">
body{
background-image: url(bcc.gif);
}
</style>
If it doesn't work at that point, make sure you have the proper path to the gif.

PS - your <img> tag should be inside the <body></body>....

SpenceQ
01-28-2009, 09:44 AM
Insert this in your head section and eliminate the background in the <body>:


<style type="text/css">
body{
background-image: url(bcc.gif);
}
</style>
If it doesn't work at that point, make sure you have the proper path to the gif.

PS - your <img> tag should be inside the <body></body>....

Thanks for the help. It now works in FF3 but not in IE7 nor still in my 1St Page editor. I'm not concerned too much in the editor not rendering, it may be a setup glitch of some sort.

Here is the modified code that works only in FF3.

...............................................................................................

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.7 [en]C-SYMPA (Win98; U)
[Netscape]">
<title>justice</title>

</head>
<style type="text/css">
body{
background-image: url(bcc.gif);
}
</style>

</html>
.............................................................................................

Spence

nevets820
01-28-2009, 09:53 AM
Thanks for the help. It now works in FF3 but not in IE7 nor still in my 1St Page editor. I'm not concerned too much in the editor not rendering, it may be a setup glitch of some sort.

Here is the modified code that works only in FF3.

...............................................................................................

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.7 [en]C-SYMPA (Win98; U)
[Netscape]">
<title>justice</title>

</head>
<style type="text/css">
body{
background-image: url(bcc.gif);
}
</style>

</html>
.............................................................................................

Spence

Put the style code inside the header. Just place it between the title and closing head tag.

WebJoel
01-30-2009, 10:09 PM
Put the style code inside the header. Just place it between the title and closing head tag. You mean to say inside the <HEAD></HEAD> or "inside the head" would do.

"Header" means something else, like "header tags" (h1, h2, h3, etc.) but yes, inside the head tags should make this work :p