I'm making a website as illustrated below, but I'm having a problem with doing div
central. I do not know how to do that part where it is nav
and section
.
Code:
html,
body {
position: relative;
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
#main {
width: 100%;
height: 100%;
}
header {
width: 100%;
height: 10%;
box-sizing: border-box;
border: 1px solid black;
}
#logo {
position: absolute;
top: 0px;
left: 0px;
}
#redes {
position: absolute;
top: 0px;
right: 0px;
}
#content {
margin-top: 20px;
position: absolute;
width: 100%;
height: 80%;
border: 1px solid black;
box-sizing: border-box;
}
footer {
box-sizing: border-box;
border: 1px solid black;
position: absolute;
bottom: 0px;
width: 100%;
}
footer p {
text-align: center;
}
nav {
position: absolute;
top: 0px;
left: 0px;
border: 1px solid black;
width: 10%;
height: 100%;
}
section {
margin—left: 10%;
width: 90%;
height: 100%;
border: 1px solid black;
}
<div id="main">
<header>
<div id="logo">
<h1>Logo</h1>
</div>
<div id="redes">
<h1>Redes Sociais</h1>
</div>
</header>
<div id="content">
<nav>
<p>
<a href="/">Home</a>
</p>
<p>
<a href="/contact">Contact</a>
</p>
</nav>
<section>asad</section>
</div>
<footer>
<p>
© Copyright by
</p>
</footer>
</div>