I'm developing a website and totally cannot centre the Facebook logo on my website.
It still shows up a little to the right. My code:
.cont {
background-color: #161616;
font-family: 'Roboto', sans-serif;
color: #FFFFFF;
}
.gridcontainer {
display: grid;
padding: 2%;
}
.website {
text-align: justify;
justify-items: center;
}
.cont-fluid {
padding: 0;
box-sizing: border-box;
font-size: 135%;
}
#about {
line-height: 1.5;
font-size: 135%;
padding-top: 1em;
text-align: justify;
margin-bottom: 7%;
margin-top: 2%;
}
#fblogo {
margin-left: auto;
margin-right: auto;
align-items: center;
max-width: 20px;
}
<div class="cont">
<div class="gridcontainer">
<div class="website">
<div class="cont-fluid" id="about">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
<div id="fblogo">
<a href="{%https://www.facebook.com/" title="facebook" target="_blank">
<img style="max-width: 80px;" src="{% static 'images/facebook.png' %}" alt="facebook">
</a>
</div>
</div>
</div>
I know it's not the best idea to use "display:grid", while I don't use it, but I also have a header of this website and if remove it or choose "display:block" a white, narrow line appear between header and rest of website, so I use grid, just because it works (but without it, the logo is still off-centre). How can I center it?