I have an issue with regards to border property in CSS. When I put border-top inside the banner id it will move or stick to the upper block element (header) but if I remove it it will have an annoying gap between header and section. I don't know what is the issue. Please help. :(
HTML
<header>
</header>
<section id="banner">
<h1>Test</h1>
</section>
CSS
body {
font-family:Arial, Verdana, sans-serif;
padding:0;
margin:0;
background-color:#f4f4f4;
}
header {
background:#333333;
color:#ffffff;
height:80px;
border-bottom:red 5px solid;
}
header nav {
float:right;
}
/*issue is here*/
#banner {
height:500px;
text-align:center;
color:#ffffff;
border-top:red 5px solid;/*remove this line and see*/
border-bottom:red 5px solid;
background-color:green;
}
#banner h1 {
font-size:50px;
}