Home>Support>Center Video

Center Video

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

How can I center video with vantage? I have searched the web and tried various things but nothing is working, I know I must be doing something incorrectly.
I added this to my Custom CSS



.post_content iframe {


   display: block;


   margin: 0 auto;


}



This answer was given to me from another site as a solution but nothin happens

URL: http://www.primitivecreations.tv

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Hi Oliver

    Thanks for reaching out. As far as I know, Vantage isn’t using a div class with the name post_class so that unfortunately wouldn’t work.

    Vantage uses FitVids.js. This ensures your videos automatically resize dynamically to the device they are being viewed on. If you remove the blank Text widget at Appearance > Widgets > Sidebar you’ll see your video will push to 100% and change as you re-size the page.

    If you don’t want this video to display at full width you can de-activate FitVids for just this video, here is how:

    Thread: How can I stop my video displaying at full width?

    Let me know how you come along. We can tackle alignment from there.

  2. 10 years, 3 months ago Oliver Saintilien

    The width of the video is good. I don’t have any problems with it and the fitvid feature makes it even better. So how would I go about centering my video?

    [/]

    That is the code that I am using to display the video on my static Home page

  3. 10 years, 3 months ago Oliver Saintilien
     <iframe src="https://www.youtube.com/embed/EEaefhD2x_E" width="1280" height="750" frameborder="0" allowfullscreen="allowfullscreen"></iframe> 
  4. 10 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    The video is currently taking up 100% of the primary container. There is a sidebar there because there is a single text widget in the sidebar widget area. Once you remove that we’ll get to make use of the full container and can center from there.

  5. 10 years, 3 months ago Oliver Saintilien

    Wow!! It was because of the widget! I didn’t even know.

  6. 10 years, 3 months ago Oliver Saintilien

    The current code I have in there is

     <iframe src="https://player.vimeo.com/video/123573517" width="500" height="281" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

    Its only set to 500 * 281 but it takes up the whole page. Is that suppose to happen?

  7. 10 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    It is, yes, that’s a consequence of using FitVids.js. If you’d like to stop FitVids from loading around this video, please see:

    Thread: How can I stop my video displaying at full width?

    Once that’s done we can then align everything as required.

    Thanks :)

  8. 10 years, 3 months ago Oliver Saintilien

    Okay I did it. What next?

  9. 10 years, 3 months ago Oliver Saintilien

    I got it to center with now that the widget isn’t there it works now

  10. 10 years, 3 months ago Oliver Saintilien
    <div class="fitvidsignore" style="text-align: center;">
    
  11. 10 years, 3 months ago Andrew Misplon
    Hi, I Work Here

    Awesome, thanks for posting. Really glad to hear you made progress :)

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More