I'm having trouble with some css on my webpage. I'm trying to get a square to appear 10 pixels from the top and 10 pixels from the bottom, when the browser is resized the box resizes with it, staying at 10 pixels from the top and bottom.
if I add margin-bottom: 10px; it doesn't do what I'm trying to explain.
How can I achieve this?
Code:
#main
{
margin-left: 190px;
margin-right: 10px;
margin-top: 10px;
border: 2px solid blue;
position: relative;
height: 500px;
background-color: white;
}
if I add margin-bottom: 10px; it doesn't do what I'm trying to explain.
How can I achieve this?