span.code { font-family: monospace; color: rgb(234, 85, 31); border-radius: 1px; background-color: rgb(239, 239, 239); }I also made a CSS <pre> class (as you can see above!), but I probably won't be using it as much because most of my longer code blocks will be put into gists.
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
pre.code { | |
border: 1px solid #919191; | |
color: rgb(153, 58, 23); | |
padding: 2px; | |
padding-left: 10px; | |
border-radius: 2px; | |
} |
I was able to do this in the Blogger menu. I went to Template > Customize > Advanced > Add CSS.
Actually, I probably should have just gone there first, but I checked out Sam's blog, and he's using <code> tags, which would be even less typing than <span style='code'>! I didn't even know that tag existed, and it looks like it's default style is to set the font-family to monospace. So I've been typing out <span style='font-family: monospace;'> all this time for no reason.
Wonderful! As so often happens in your posts, I was thinking "I hope Alex tells me *how* he added custom CSS to his blog", and sure enough, a bit further down in the post, you did ;-)
ReplyDelete