3
I am creating a footer for an html page. It is very simple and composed of a SINGLE line. I would like one part, which contains Copy information, to be aligned to the left margin and another, which contains a menu, to be aligned to the right margin of the site.
I split the text in two divs
and gave a float: right
in the second. It turns out that I’m not able to align the two parts vertically so that they seem to be on the same line.
Follow 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;
}