I have 3 boxes. When setting the middle's position to relative (to 'body' in this case) and negative top, the box below doesn't move up too. How could I do that?
HTML:
<div class="box" id="up"></div>
<div class="box" id="middle"></div>
<div class="box" id="down"></div>
CSS:
.box {
width: 400px;
height:200px;
position: relative;
}
#up {
background: red;
}
#middle {
top: -50px;
background: green;
}
#down {
background: blue;
}
http://codepen.io/anon/pen/dBgbz/
EDIT: I forgot to say that I've tried with negative margin-top, but works except for Internet Explorer. Is there any other way to do it?