I have a container div which is the header. Inside the header is the logo and navigation. My logo and navigation divs are children of the header container. The logo is inside of the header, while the navigation text is not in the top right, but outside of the container.
body {
margin: 0;
background-color: red;
}
.header {
width: 100%;
background-color: black;
height: 70px;
}
.logo {
color: white;
padding: 10px 5px;
font-size: 10px;
}
.nav {
color: white;
}
<div class="header">
<div class="logo">
<h1>New York</h1>
</div>
<div class="nav">
<h1>Hey</h1>
</div>
</div>
2
Answers
I think add float: right to the .nav class
Add
display: flex
to.header
css class: