PapstBenR
Neues Mitglied
Hallo,
ich hab ein Problem mit zwei div Elementen(navi und content).
Und zwar müsste bei content der margin-top doch 7% sein, jedoch passt nur der Abstand von 3%, damit beide Kante an Kante liegen. Jemand Rat wieso das so ist?
ich hab ein Problem mit zwei div Elementen(navi und content).
Code:
*{
margin: 0px;
padding: 0px;
}
body{
background-color: #E5E5E5;
}
#logo{
position: fixed;
height: 7%;
width: 20%;
background-color: white;
}
#navi{
position: fixed;
height: 7%;
width: 80%;
left: 20%;
background-color: red;
}
#content{
height: 93%;
width: 80%;
margin: 7% 0 0 20%;
background-color: blue;
float: left;
}
HTML:
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="stylesheet" type="text/css" href="solidStyle.css">
<meta charset="utf-8">
</head>
<body>
<div id="logo">
test
</div>
<div id="navi">
test
</div>
<div id="content">
test<br><br><br><br><br><br><br><br>
</div>
</body>
</html>
Und zwar müsste bei content der margin-top doch 7% sein, jedoch passt nur der Abstand von 3%, damit beide Kante an Kante liegen. Jemand Rat wieso das so ist?