Support » Fixing WordPress » centering a video

  • I’m working on this site: http://medvantageintl.com/
    and on the investor page I’m trying to center that video at the top. I’ve tried the <div> tags and <center> and [center] and even placing “align” and “float” in the video code itself.
    I did learn yesterday that this is a modified commercial theme (set up by the previous designer), is that messing with it?
    Any time I place code it just shows up as writing on the page.
    Advice? The video on the technolog page automatically centers, and I don’t know why that one does and the other does not.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    The slider isn’t coded to be CSS-friendly, the element you need to target is a <div> with no classes or IDs.

    This is the element:

    <div style="width: 645px; max-width: 100%;">

    You need to apply this style to it:

    margin: 0 auto;

    I’m not sure what to suggest other than applying CSS through jQuery because you can target that element easier. Although we don’t support your theme.

    Okay, thanks.
    There was many reasons the previous designer was fired… this is just one of many. Now I get to clean up his mess, LOL

    still doesn’t appear center because of nav padding. Try:

    #header .main-nav {
    height: 41px;
    width: 100%;
    /* padding: 0px 0px 0px 50px; */
    background-color: #46a1b4;
    background-clip: padding-box;
    -moz-background-clip: padding-box;
    -webkit-background-clip: padding;
    position: absolute;
    left: 0px;
    bottom: 50px;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.1)), to(rgba(0,0,0,0)));
    background-image: -webkit-linear-gradient(top, rgba(255,255,255,.1), rgba(0,0,0,0));
    background-image: -moz-linear-gradient(top, rgba(255,255,255,.1), rgba(0,0,0,0));
    background-image: -ms-linear-gradient(top, rgba(255,255,255,.1), rgba(0,0,0,0));
    background-image: -o-linear-gradient(top, rgba(255,255,255,.1), rgba(0,0,0,0));
    background-image: linear-gradient(top, rgba(255,255,255,.1), rgba(0,0,0,0));
    }

    Also, use a child theme of your Med Vantage theme so that you can upgrade the Med Vantage without breaking the site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘centering a video’ is closed to new replies.