Search code examples
htmlgithubgist

Is there a way to specify the width of an embedded gist?


I am trying to embed a gist into a webpage. Take the gist below as an example:

<script src="https://gist.github.com/Astr0surf3r/5208714.js"></script>

I wonder if there is a way to set the width of the gist. For example, I would like to to make the gist narrower than the default width.


Solution

  • You can control the width by modifying the CSS class that this gist is using.

    .gist { width: 250px; }
    

    Example: http://jsfiddle.net/aFwEd/