0

Sorry, this may be something that's been covered before (my first post too!).

Please can someone help me work out why I can't vertically align the text in the following;

#welcome{
  position:relative;
  min-height:400px;
  background:url('/img/nufc.jpg');
  background-size:cover;
  background-attachment:fixed;
  color:#fff;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/>

<section id="welcome" class="bg-primary text-black">
  <div class="dark-overlay">
  <div class="container">
    <div class="row">
      <div class="col my-auto">
        <h3 class="mb-4 display-3">Welcome</h3>
        <p>Welcome to my personal website</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure recusandae quasi iste totam,  saepe! Quaerat praesentium, adipisci laudantium ipsam est quod. Magni maiores omnis minima dicta, iusto aperiam. Laborum, molestias.</p>
        </div>
      </div>
    </div>
  </div>
</section>

Any help would be great. I know that this may have been answered elsewhere, but I have tried the solutions found elsewhere, and they don't seem to be working for me.

This is why I've come to the forum for some help!

Matt A
  • 1
  • 1
  • 1
    vertical align? what text? where? what it should look like? – Gerardo BLANCO Apr 12 '18 at 17:07
  • Welcome to StackOverflow! This question has been answered before, and you'll find the answer by reading the duplicate questions. – Carol Skelly Apr 12 '18 at 17:12
  • Run the code snippet. I would like the white text to be vertically aligned within the blue box. – Matt A Apr 12 '18 at 17:16
  • Sorry - I understand that this may have been answered before, but I am just looking for help as to why my text isn't aligning correctly. – Matt A Apr 12 '18 at 17:16
  • And you will discover that by reading the other answers. Also, I don't see anything in the question that shows what you've attempted so far to vertical align. – Carol Skelly Apr 12 '18 at 17:36
  • 'my-auto'. I've now resolved this. I'm pretty new to learning and was just after some general guidance, but thanks anyway. – Matt A Apr 12 '18 at 20:13

0 Answers0