I am creating a footer for an html page. It is very simple and consists of a SINGLE line. I would like one part, which contains the Copy information, to be aligned to the left margin, and another part, which contains a menu, to be aligned to the right margin of the site.
I separated the text in two divs
and gave a float: right
in the second. I happen to be unable to align the two parts vertically so they appear to be on the same line.
Here are the codes:
HTML
<section id="rodape-legal">
<div class="rodape-legal" id="rodape-legal-copy">
<h6>Copyright © 2017. Todos os direitos reservados.</h6>
</div>
<div class="rodape-legal" id="rodape-legal-menu">
<nav class="doc-legais">
<h1>Documentos Legais</h1>
<ul>
<li class="menu"><h6><a href="#">Início</a></h6></li>
<li class="menu"><h6><a href="#">Blog</a></h6></li>
<li class="menu"><h6><a href="#">Facebook</a></h6></li>
<li class="menu"><h6><a href="#">Twitter</a></h6></li>
<li class="menu"><h6><a href="#">Linkedin</a></h6></li>
<li class="menu"><h6><a href="#">Segurança</a></h6></li>
<li class="menu"><h6><a href="#">Privacidade</a></h6></li>
<li class="menu"><h6><a href="#">Termos de uso</a></h6></li>
</ul>
</nav>
</div>
</section>
CSS
section#rodape-legal {
margin: auto;
padding-top: -20px;
text-align: left;
}
div.rodape-legal {
display: inline-block;
}
div#rodape-legal-menu {
text-align: right;
display: inline-block;
float: right;
}
nav.doc-legais li {
display: inline-block;
margin-left: 10px;
}
nav.doc-legais h1 {
display: none;
}
nav.doc-legais a {
transition: color, 1s;
text-decoration: none;
color: black
}
footer h6 {
font-size: 12px;
font-weight: 300;
}