Skip to content

Instantly share code, notes, and snippets.

@mladoux
Last active February 3, 2022 12:02
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mladoux/c0273e68d9bfab3afee19ca788004cdf to your computer and use it in GitHub Desktop.
Resize embedded gist code box and centers it. Adjust to taste.
/* Set width to 600px, and center box */
.gist {
margin-left: auto;
margin-right: auto;
width: 600px !important;
}
/* Limit height and width of script box, and enable scrollbars */
.gist-data {
height:250px;
overflow-y: visible;
width: 600px;
overflow-x: visible;
}
@TomEpsilon
Copy link

Ahem? That's really nice!

@mladoux
Copy link
Author

mladoux commented Jun 7, 2021

Ahem? That's really nice!

Thanks. You may also be able to change the overfloy-y & overflow-x to auto. But I think there was some weirdness when I did that before. I can't remember.

@TomEpsilon
Copy link

I have a shorter answer: Wrap the script in a div, then does all the width and height on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment