Struggling with a basic CSS problem as I practice my skills, I am finding it challenging to position a div at the very top of the screen. Despite setting the background-color, the div is not aligning perfectly with the top edge. Interestingly, adding a border seems to resolve this issue, as shown in the images below:
No border, slight gap With border, no gap
body {
margin: 0;
}
div#wrap {
background-color: #55ccff;
width: 60%;
min-width: 600px;
margin-left: auto;
margin-right: auto;
}
<div id="wrap">
<h1>Content</h1>
<p>
Content goes here
</p>
<ul>
<li>More content</li>
</ul>
<p class="copyright">
All rights reserved
</p>
</div>