Im trying to center a small div inside a bigger one, both horizontal and vertical. When i give the small div a margin top it moves both divs downwards why is that? Is going with position relative and adjusting top and left the correct way or ill have other problems? The divs are both with % on the width
code:
<html>
<head>
<style>
#big_div{
background-color:red;
width:100%;
height:200px;
}
#small_div{
border:2px solid black;
width:20%;
height:80px;
}
</style>
</head>
<body>
<div id="big_div">
<div id="small_div">
something
</div>
</div>
</body>
</html>