Last active
February 3, 2022 12:02
-
-
Save mladoux/c0273e68d9bfab3afee19ca788004cdf to your computer and use it in GitHub Desktop.
Resize embedded gist code box and centers it. Adjust to taste.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
} |
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.
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
Ahem? That's really nice!