2
I would like to know how to centralize an icon implemented via background url()
in the css
along with my li
, the problem is that when I add the icon, it pushes my li
and how he appears glued to the li
I have to give a margin
, And when I do that, that’s when he pulls away and everything gets decentralized compared to mine header
as I show in the prints with and without these changes. Is there any way that this does 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>
paste the code, and leave the images to show only the result. It was best a minimal example!
– novic
Without the code not to give you an accurate answer, please edit your question and include your HTML and CSS
– hugocsl
there it is... sorry...
– Tony Ivan
Tony was for you to edit by putting the CSS of the entire LI, as it was in the images...
– hugocsl