Home Center alignment of image inside flex
Reply: 0

Center alignment of image inside flex

user788
1#
user788 Published in April 26, 2018, 1:40 pm

I have img and a inside div with display: flex.
Looks like this:

<div style="display: flex;">
  <div class="site-title-container">
    <img style="border-radius: 7px; width: 34px; height: 34px;" src="/assets/img/Icon-32@3x.png">  <!-- width="34" height="34" -->
    <a class="site-title" rel="author" href="{{ " / " | relative_url }}">{{ site.title | escape }}</a>
  </div>
 //.....
</div>

CSS

   .site-title-container {
        float: left;
        display: flex;
        justify-content: center;
        align-content: center;
    }

Why can image still not be aligned to center?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.435079 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO