< div> label background image set, it cannot display... Set the background


[code=html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>No title</title>
<style type="text/css">
#daoHang{
width:800px;
height:190px;
background-color:blue;
layer-background-image:url("img\daoHangBeiJing.png");
margin-bottom:20px;
margin-left:10%;
color:white;
text-align:center;
vertical-align:middle;
}
</style>
</head>
<body>
<div id="daoHang">
<a>Home page</a>
<a>Journal</a>
<a>Album</a>
<a>Music</a>
<a>The time axis</a>
</div>
</body>

[/code]
Html production Webpage, what precautions? A novice, do not understand.. hope to forgive me... .

Started by Gloria at December 12, 2016 - 4:43 PM

NS4+ specific attributes, the Netscape browser specific attributes! Set the background color! Now nobody is using Netscape browser, so not much use

Posted by Caspar at December 20, 2016 - 5:25 PM

layer-background-image:url("img\daoHangBeiJing.png");


The direct use of background is much better, no compatibility issues:
background-image:url("img\daoHangBeiJing.png");

Posted by Dana at December 26, 2016 - 5:35 PM

+1

Posted by Wesley at January 05, 2017 - 6:34 PM

img/daoHangBeiJing.png

Posted by Webb at January 06, 2017 - 7:32 PM

The backslash is changed into a forward slash

Posted by Addison at January 10, 2017 - 7:07 PM