Forum Moderators: not2easy
html,
body {
background-color: yellow;
}
.layer1 {
position: absolute;
left: 40px; top: 80px;
width: 100px;height: 400px;
padding: 1em;
background-color:red;
}
.myImage1 {
position: absolute;
left: 200px; top: 100px;
width: 400px;
height: 300px;
background-image: url(images/home1.jpg);
background-repeat: no-repeat;
}
.myImage2 {
position: absolute;
left: 40px; top: 150px;
width: 100px;
height: 50px;
background-image: url(images/home2.jpg);
background-repeat: no-repeat;
}
-----A.htm-------
<html>
<head>
<link rel="stylesheet" type="text/css" href="B.css" />
</head>
<body>
<div class="layer1">DDDD</div>
<div class="myImage1"></div>
<div class="myImage2">GGGG</div>
</body>
</html>
in what way don't they work? do they not align properly? do they appear elsewhere? or do the background images not appear at all?
If this is the case, I suspect your problem is in Paths.. am I correct that your css file is in a separate folder apart from your root?
if so.. try throwing some dots and a slash into your path like this:
background-image: url(../images/home1.jpg);
background-image: url(/images/home1.jpg);
or even this:
background-image: url(./images/home1.jpg);
hope this helps
:-)
s42