This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Center Video

Open 11 replies premiumthemetheme-vantage
10 years ago · Last reply by Andrew Misplon 10 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

11
  1. Andrew Misplon Staff 10 years, 10 months ago

    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. Oliver Saintilien 10 years, 10 months ago

    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. Oliver Saintilien 10 years, 10 months ago
    <iframe src="https://www.youtube.com/embed/EEaefhD2x_E" width="1280" height="750" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
  4. Andrew Misplon Staff 10 years, 10 months ago

    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. Oliver Saintilien 10 years, 10 months ago

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

  6. Oliver Saintilien 10 years, 10 months ago

    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. Andrew Misplon Staff 10 years, 10 months ago

    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. Oliver Saintilien 10 years, 10 months ago

    Okay I did it. What next?

  9. Oliver Saintilien 10 years, 10 months ago

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

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

    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.

Have a different question or issue?

Start New Thread