I want these two divs to have different positioning. The sidebar should remain fixed at the top. Why is the sidebar aligned with the article div instead of sticking to the top?
body{
margin: 0;
padding: 0;
}
div#sidebar{
background-color: yellow;
margin: 0;
padding: 0;
float: left;
height: 100%;
width: 200px;
position: fixed;
}
div#article{
background-color: blue;
margin-left: 200px;
margin-top: 50px;
height: 500px;
}
HTML :
<div id="sidebar">
sidebar
</div>
<div id="article">
article
</div>