Search code examples
cssgithubgist

How to change height of a dynamically embedded gist?


How to change height of a dynamically embedded gist?

I have tried a lot of different ways using css and I can't seem to figure out how to change the height of the gist to where it has scrollbars.

Gist call

$.getJSON("https://gist.github.com/username/my_gist.json?callback=?", function(result){
    $('div.container').append('<div class="row slide sub-slide-1"><div class="col-xs-offset-1 col-xs-8">' + result.div + '</div></div>');
    $('head').append('<link rel="stylesheet" href="' + result.stylesheet + '"/>');
});

Solution

  • Edit: Just did this and works fine. You can also apply it on .gist, works the same

    .container{
     height: 150px;
     overflow-y: scroll; 
    }
    

    View Demo