[Resolved] Center title on page

Home Forums Support [Resolved] Center title on page

Home Forums Support Center title on page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #43434
    Elwin Hoover

    Tom,

    How do I center the title of the page on the site? Also, how to do I center my Youtube video?

    #43587
    Tom
    Lead Developer
    Lead Developer

    Hi Elwin,

    This CSS should do it for you.

    .entry-header {
          text-align: center;
    }

    As for your YouTube video, you’ll need to surround it like this:

    <div style="text-align: center;">
    YOUTUBE CODE IN HERE
    </div>

    Hope this helps 🙂

    #44958
    Elwin Hoover

    Thanks, Tom. I tried it and it didn’t work, so I just used this code:

    <center><iframe src=”//www.youtube.com/embed/oZFP8WBxWVA?rel=0&controls=0&showinfo=0″ width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe></center>

    When I view the Youtube video on my iphone, , it doesn’t conform to the phone…it’s just really long. How do I make it responsive on mobile?

    Thank you so much!
    E

    #44960
    Elwin Hoover

    Tom,

    I just want to center the title on the home page. And probably the contact page. How can I be choosy with which pages get a centered title and which ones don’t?

    #44961
    Tom
    Lead Developer
    Lead Developer

    For the homepage, you can do this:

    .home .entry-header {
          text-align: center;
    }

    For the contact page, you’ll need to find the unique class given to that page.

    It will be attach to the tag in the source, and will look like this: page-id-xx.

    The best way to find it is to use Chrome – right click and select “Inspect Element”. Now find the <body> tag (near the top) – there will be a class like the above in their, with the unique number for that page.

    Then you just add this:

    .page-id-xx .entry-header {
          text-align: center;
    }

    By default, videos are responsive on mobile devices.

    Can you post your link to the page with the video so I can take a look?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.