I want to have a box within a box within a box; a border within a border within a border using divs. If you can see what I'm doing wrong please help. It would really be appreciated.
Here is my html:
<!DOCTYPE html>
<html>
<link rel="stylesheet" type="text/css" href="divReference.css">
<body>
<div class="box">
<div class="TopContainer">
<div class="Container1">
</div>
<div class="Container2">
</div>
<div class="Container3">
</div>
<div class="Container4">
</div>
</div>
</div>
</body>
</html>
Here is my css:
<style>
.box {
width: 300px;
height: 200px;
padding: 10px;
border: 4px red;
margin: 15px;
}
.TopContainer {
border:12px green;
padding: 5em;
position: relative;
}
.Container1{
border:4px solid black;
padding: 1em;
}
.Container2{
border:4px solid black;
padding: 1em;
}
.Container3{
border:4px solid black;
padding: 1em;
}
.Container4{
border:4px solid black;
padding: 1em;
}
</style>