-1

I centered my text vertically, Now i need to center it horizontaly to. Did i miss something or its not possible to do text-center when i have display: flex; and align-items: center;

<div class="row">
  <div class="bild text-center">
    <h2 class="vit text-center">Mobiltelefoner & Surfplattor</h2>
    <img src="https://www.zong.com.pk/images/uploads/misc/4.internationalcalls_desktop-Banner.jpg" style="visibility: hidden;">
  </div>
</div>

CSS

div.bild {
  width: 100%;
  background: url('https://www.zong.com.pk/images/uploads/misc/4.internationalcalls_desktop-Banner.jpg') no-repeat center center;
  background-size:100% auto;
  display: flex;
  align-items: center;   
}

http://www.bootply.com/1k8s3Rw322

roberrrt-s
  • 7,914
  • 2
  • 46
  • 57
Brand
  • 1
  • 2
    Possible duplicate of [Flexbox: center horizontally and vertically](http://stackoverflow.com/questions/19026884/flexbox-center-horizontally-and-vertically) – Flexicoder Nov 28 '16 at 09:29

1 Answers1

0

I think it would be your expectation.

<div align="center">
    <p>This is going to be aligned center</p>
    <p>This is also</p>
</div>
Kay
  • 246
  • 2
  • 16