I have created an outer div element and I am trying to make a simple rectangle inside it. Now, the horizontal positioning of the first side is spot on. However, for the vertical positioning, I want to have a margin of 10px between the top, bottom of the lenght1 div and the outer div. Below is my code.
<!DOCTYPE html>
<html>
<head>
<style>
*{
margin:0px;
padding:0px;
}
body{
margin:10px 0px;
}
div.outer{
height:400px;
width: 500px;
margin:100px auto;
margin-top: 130px;
background-color:red;
}
div.length1{
height:380px;
width:30px;
margin:10px 470px 10px 0px;
background-color:blue;
}
</style>
</head>
<body>
<div class="outer">
<div class="length1"></div>
<div class="breadth1"></div>
<div class="length2"></div>
<div class="breadth2"></div>
</div>
</body>
</html>