I need your help,
The divs appear to be nested properly (left, top and right) borders line up but at the bottom it seems that they are longer than that of the container div.
See pic here:
Here is the HTML coding:
<!DOCTYPE html>
<html>
<head>
<title>Centered Div</title>
<style>
body { background: #000; }
#wrapper {
height: 100px;
width: 500px;
}
#wrapper {
bottom: 50%;
right: 50%;
position: absolute;
}
#container {
background: rgb(230,230,230);
left: 50%;
padding: 10px;
top: 50%;
margin: 0;
padding: 0;
height: 100%;
border: 1px solid red;
height: 100%;
position: relative;
}
#inner1 {
height: 100%;
border: 1px solid blue;
}
#inner2 {
height: 100%;
border: 1px solid green;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="container">
<div id="inner1">
<div id="inner2"></div>
</div>
</div>
</div>
</body>
</html>