Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

background-image and DocType 1

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
In the following code, the background image does not appear in both IE7 and FF2.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
  <title>Sort Table</title>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

</head>
<body style="background-image: url(images\theme1_bg.jpg)">
  <p>fdasf dasfksald;f jksdaf; jsadl;f</p>
</body>

</html>

After I removed the DocType, the background image appeared in IE7 but not FF2.

In IE7, it does not matter whether the DocType is xhtml 1 or HTML 4. As long as there is DocType, the background image disappears.

I googled the problem, which appeared to have happened to other people, but there is no clear answer. And the Forum's Search function is under maintenance.

Any input is appreciated.

Seaport
 
Try this:
Code:
<body style="background-image: url(images[!]/[/!]theme1_bg.jpg)">
You shouldn't use backslashes in urls.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Vragabond,

Thanks. One star for you.

Seaport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top