Bulma: How to embed / display youtube video?

Created on 20 Nov 2017  路  6Comments  路  Source: jgthms/bulma

Any suggestions?
For example 4 video's on a row?

Something like http://getbootstrap.com/docs/4.0/utilities/embed/

Most helpful comment

Thanks, Jeremy, this did the trick:

    <section>
        <div class="container">
            <div class="columns">
                <div class="column">
                    <!-- <youtube :video-id="video1"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
                <div class="column">
                    <!-- <youtube :video-id="video2"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
            <!-- </div>
            <div class="columns"> -->
                <div class="column">
                    <!-- <youtube :video-id="video3"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
                <div class="column">
                    <!-- <youtube :video-id="video4"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
            </div>
        </div>
    </section>

All 6 comments

Have you tried using the official YouTube embed with Bulma columns?

Thanks, Jeremy, this did the trick:

    <section>
        <div class="container">
            <div class="columns">
                <div class="column">
                    <!-- <youtube :video-id="video1"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
                <div class="column">
                    <!-- <youtube :video-id="video2"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
            <!-- </div>
            <div class="columns"> -->
                <div class="column">
                    <!-- <youtube :video-id="video3"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
                <div class="column">
                    <!-- <youtube :video-id="video4"></youtube> -->
                    <iframe width="100%" height="auto" src="https://youtube.com/embed/xxxxxxx" allowfullscreen></iframe>
                </div>
            </div>
        </div>
    </section>

I had to also add some custom CSS to make this work (otherwise the video height was limited to 150px). Basically followed this guide.

Its not working Jeremy has created a problem, please make it normal remove any css you have any in bulma main css file

It ends up as simple as adding this to CSS,

iframe {
    max-height: unset;
}

I solved my problem by reading this https://bulma.io/documentation/elements/image/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leofontes picture leofontes  路  3Comments

jaredreich picture jaredreich  路  3Comments

DAreRodz picture DAreRodz  路  3Comments

fundon picture fundon  路  3Comments

Laraveldeep picture Laraveldeep  路  3Comments