I'm trying to copy the Harvard about page as an exercise in order to learn css. The problem I've come upon is that I cannot for the life of me center the navbar and the article element I've got on the page.
I've managed to align the article and navbar side by side by putting them both in a div element and specifying the width as 100%, then making the navbar and article elements 50% of the width each.
This is what I got so far: https://i.stack.imgur.com/h1JvL.jpg
Here's my css:
div {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
}
nav {
width: 50%;
vertical-align: top;
box-sizing: border-box;
}
article {
width: 50%;
vertical-align: top;
padding-right: 80px;
box-sizing: border-box;
float: right;
margin-top: -250px;
}