I need this to be explained to me. I thought I understood CSS; clearly I haven't a bloody clue.
body {
margin:0;
padding:0;
}
#contain{
position: relative;
width: 100%
height: 100%;
}
#wizard{
position: absolute;
left: 5%;
width:10%;
height: 100%;
background-color: black;
}
#main{
position: absolute;
height: 100%;
left: 15%;
border-style: dashed;
border-color: red;
}
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<script>
//css here, removed for purpose of the question
</script>
</head>
<body>
<div id="contain">
<div id="wizard">
</div>
<div id="main">
</div>
</div>
</body>
</html>
This is one of the most basic examples of CSS positioning, and I've used this many times before. I understand that this is "incorrect", but why? why do I only see a single red dot (the condensed, dashed border of #main
) 15% from the left, and nothing else?