Need help extending the border-top of an element beyond a container width set to 1024px
, while maintaining center alignment on the page with left alignment.
Thank you!
Here is the code snippet:
HTML
<main>
<div>
<span>Hello</span>
</div>
</main>
CSS
main {
margin: 0 auto;
width:1024px;
}
div {
float:left;
width:50%;
transition:all 0.4s ease;
}
div:hover {
background:red;
}