Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1023789
    bedingfield
    Participant

    Morning,

    Could you tell me how I can get a page’s image border to replicate the same border spacing as the YouTube embed?

    The want them to look the same.

    See YouTube embed here: http://elyrunners.club/nye-10k/

    This is the code currently used for photos…

    <img class="aligncenter size-full wp-image-359" src="http://elyrunners.club/wp-content/uploads/2016/06/10k-map-1024x782.png" alt="10k-map" width="1363" height="1041" />

    Also, with the embed code for YouTube, I want to hide controls, but it don’t seem to work. I used…

    [x_video_embed type=“16:9,” hide_controls="true"]<iframe width="560" height="315" src="https://www.youtube.com/embed/B6WJKZSAJsw" frameborder="0" allowfullscreen></iframe>[/x_video_embed]

    Thank you.

    #1023866
    John Ezra
    Member

    Hi there,

    Thanks for writing in! Youtube has its own setting to remove the controls and other options. It is the

    controls=0 parameter you add after your youtube link after the ? mark or after a ; if you have other parameters already on your embed code.

    For example your code:

    [x_video_embed type="16:9," hide_controls="true"]<iframe width="560" height="315" src="https://www.youtube.com/embed/B6WJKZSAJsw" frameborder="0" allowfullscreen></iframe>[/x_video_embed]

    should be changed to this:

    [x_video_embed type="16:9"]<iframe width="560" height="315" src="https://www.youtube.com/embed/B6WJKZSAJsw?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>[/x_video_embed]

    Note that aside from no controls, I also switched off the video info and related videos at the end.

    So this string was added to the end of your video URL ?rel=0&controls=0&showinfo=0.

    You can just add that string to the end of your other videos or you can easily go into youtube embed settings and untick the options so the code is autogenerated for you.

    Youtube Embed Options

    Now regarding the frame styling to be added to images, use the following CSS. You can add this under Custom > CSS in the Customizer or in your child theme’s style.css file.

    img.aligncenter.size-full {
        border: 1px solid #cccccc !important;
        padding: 2.5%;
    }

    Hope this helps – thanks!

    #1023968
    bedingfield
    Participant

    thank you. You have been very helpful. Much appreciated.

    Karl

    #1024239
    Joao
    Moderator

    You are welcome Karl.

    Let us know if we can help you with anything else.

    Thanks

    Joao

  • <script> jQuery(function($){ $("#no-reply-1023789 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>