Hejsa.
Spørgsmål, hvordan får jeg min class="left", class="middlea,b,c,d" og class="right" til at skifte billeder når jeg holder over det div område jeg vil have til at skifte?
Min css ser således ud:
body {
margin: 0px;
overflow: hidden;
}
.divet {
height: 56px;
width: 800px;
}
.left {
height: 56px;
position:relativt;
top: 0px;
left: 0px;
}
.middlena {
width: 134px;
height: 56px;
position:relativt;
top: 0px;
}
.middlenb {
width: 134px;
height: 56px;
position:relativt;
top: 0px;
}
.middlenc {
width: 134px;
height: 56px;
position:relativt;
top: 0px;
}
.middlend {
width: 134px;
height: 56px;
position:relativt;
top: 0px;
}
.right {
width: 115px;
height: 56px;
position:relativt;
top: 0px;
right: 0px;
}
.top {
background-image: url('middle.png');
height: 98px;
width: 800px;
}
.middle {
background-image: url('middle2.png');
width: 800px;
height: 450px;
overflow: auto;
}
.bottom {
background-image: url('bottom.png');
width: 800px;
height: 46px;
}
HTML KODE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>design 003</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="designet.css" type="text/css">
</head>
<body>
<center>
<div class="divet">
<div class="left"><div height="56px" width="149px"><a href="">Front</a></div>
<div class="middlena"><a href="">Front</a></div>
<div class="middlenb"><a href="">Front</a></div>
<div class="middlenc"><a href="">Front</a></div>
<div class="middlend"><a href="">Front</a></div>
<div class="right"><a href="">Front</a></div>
</div>
<div class="top"></div>
<div class="middle"></div>
<div class="bottom"></div>
</center>
</body>
</html>
Javascript koden:
<script type="javascript/text">
function changeBackIn(img1) {
document.getElementById("a").style.property="url("+ img1 +")"
}
</script>
Hjælp søges..