• Resolved danniee

    (@danniee)


    Hi,

    Plugin works great, but there is no padding/line-break at the bottom of the video like it is when I add a normal Youtube iframe embed.

    With plugin the text is directly under the video. Is there a way to fix this automatically instead of having to add line break manually in all my 400 posts?

    • This topic was modified 4 years, 4 months ago by danniee.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eirudo

    (@eirudo)

    Hello, you can add custom CSS to your Theme
    (Appearance > Customize > Additional CSS)
    or custom CSS section in Theme Options of your current theme (if available)

    Insert this code:

    .erd-youtube-responsive {
        margin-bottom: 25px !important;
    }

    Change 25px to any value you want.
    If you also want to add space top of the video, you can specify margin-top. Example:

    .erd-youtube-responsive {
        margin-top: 25px !important;
        margin-bottom: 25px !important;
    }

    Let me know if it works ??

    • This reply was modified 4 years, 4 months ago by Eirudo.
    • This reply was modified 4 years, 4 months ago by Eirudo.
    Thread Starter danniee

    (@danniee)

    Thank you! I will try it ??

    Do you know why this happens? Is it normal? When I add the normal Youtube embed code I get a line break automatically, but when I use your plugin or use css code like this to make video responsive there is no line break:

    .video-container {
        overflow: hidden;
        position: relative;
        width:100%;
    	margin-bottom:12px;
    }
    
    .video-container::after {
        padding-top: 56.25%;
        display: block;
        content: '';
    }
    
    .video-container iframe {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    Plugin Author Eirudo

    (@eirudo)

    Don’t worry, it’s very normal ??

    Because I’m not adding spaces or margin on the video by default.

    I consider this because most people using text editor on their WordPress Post (which WordPress added line-breaks automatically).

    Even you add that custom CSS, will not affect youtube video on this plugin because it’s using different CSS classes.

    But, you can using code I provide above.

    And… Thank you for using this plugin ^_^

    Thread Starter danniee

    (@danniee)

    Thank you for your kind help. However, I am using text editor too, the classic editor, but it is not adding automatic line break when I add a video. Is Youtube adding space/margin by default with css on their side? Just trying to understand if something is wrong with my site.

    Plugin Author Eirudo

    (@eirudo)

    By default, original YouTube code not adding any break spaces/margin.
    So, it’s will follow CSS rules on the theme…

    But for this plugin, I set it to 0px so there’s no break spaces and follow WordPress rule (automatically adding break spaces).

    If your post not showing break spaces, it might your theme has a function which remove WordPress break-spaces rule on each post.

    Wordpress auto break-spaces really annoying sometimes…
    But most people really need it since don’t want adding <br> codes manually.

    Thread Starter danniee

    (@danniee)

    I fixed it! I had set a class to 0px instead of 20px in my theme. Sorry for the trouble.

    Plugin Author Eirudo

    (@eirudo)

    Glad to know if the issues has been fixed ??

    No probem, I’ll help if there’s any trouble about this plugin ??

    Thank you for using Simple YouTube Responsive!
    Have a nice day…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add line break bottom?’ is closed to new replies.