-4

Can someone help me to center my text using javascript or in css? I'm using bootstrap on this.

This is my html code

<header id="home">
    <div class="container">
      <div class="row banner" style="margin-top: 0px;">
        <div class="banner-text">
          <h1 class="responsive-headline wow zoomIn animated" style="font-size: 72px; visibility: visible; animation-name: zoomIn;">I'm <span>Alyssa Reyes</span></h1>
          <h3 class="wow fadeInUp animated" style="visibility: visible; animation-name: fadeInUp;">I'm a passionate <span>Web Designer</span> and <span>Developer</span> creating modern and responsive design for <span>Web</span> and <span>Mobile</span>. <br> Let's start and learn more <a href="#about" class="smoothscroll">about me</a>.</h3>
          <hr>
        </div>
      </div>
    </div>
</header>

Thanks

enter image description here

Alyssa Reyes
  • 2,137
  • 6
  • 23
  • 39
  • With an image there is not much we can say, Provide your code – laaposto Oct 20 '14 at 09:43
  • 2
    I don't know much about Bootstrap, but just use Google on this one. "center text vertical css", see? There are many ways how to achieve so. One of many duplicates: http://stackoverflow.com/questions/8865458/how-to-align-text-vertically-center-in-div-with-css – Petr Cibulka Oct 20 '14 at 09:44
  • Show us your HTML markup and your CSS code and we will be able to help you. :) – consuela Oct 20 '14 at 09:49
  • `text-align: center;`? – Benjamin Oct 20 '14 at 09:57
  • My question already judged and down vote it and I don't know why so I changed the image for you guys to understand – Alyssa Reyes Oct 20 '14 at 10:56

1 Answers1

0

You can use text-align property

 <h1>Alyssa Reyes</h1>


 css

 h1{
    text-align:center;
   }

Demo of your page

if you want to center vertically, you can use

 .banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%) }

demo

DracSkywalker
  • 362
  • 4
  • 13