I'd like to know how to center an icon implemented via background url()
in css
along with my li
, the problem is that when I add the icon, it moves away the right side of my li
and how it appears pasted on the li
I got a margin
, and when I do that, it moves away even more and everything is decentralized compared to my header
as I show in the prints with and without those changes. Is there any way that this will not happen?
CSS--
.main_footer_content{
display: flex;
flex-direction: column;
padding: 1em;
background-color: #010f19;
max-width: 400px;
margin: 0 auto;
}
.main_footer_content article{
display: flex;
flex-direction: column;
flex: 1;
text-align: center;
padding: 1em 0;
}
.main_footer_content article header{
padding: 1em 0;
color: #fff;
font-size: 1.2em;
border-bottom: 1px solid #fff;
}
.main_footer_menus{
padding: 0.5em 0;
display: flex;
flex-direction: column;
}
.main_footer_menus li{
padding: 0.5em 0;
flex: 1;
}
.main_footer_menus li a{
color: #FFF;
}
.main_footer_menus li::before{
content: url(../img/verified.png);
margin-right: 0.5em;
}
HTML--
<section class="main_footer_content">
<h1 class="font_zero">Vem ver nossas novidades!</h1>
<article>
<header>
<h1 class="menu_site_titulo">Menu do site</h1>
</header>
<ul class="main_footer_menus">
<li><a href="#">Home</a></li>
<li><a href="#">Quem somos</a></li>
<li><a href="#">Serviços</a></li>
<li><a href="#">Podutos</a></li>
<li><a href="#">Contatos</a></li>
</ul>
</article>
</section>