{"id":65,"date":"2011-08-18T00:04:26","date_gmt":"2011-08-18T04:04:26","guid":{"rendered":"http:\/\/www.jetmore.org\/john\/blog\/?p=65"},"modified":"2012-03-29T23:02:00","modified_gmt":"2012-03-30T03:02:00","slug":"horizontal-scrolling-in-code-blocks","status":"publish","type":"post","link":"https:\/\/www.jetmore.org\/john\/blog\/2011\/08\/horizontal-scrolling-in-code-blocks\/","title":{"rendered":"Horizontal scrolling in code blocks"},"content":{"rendered":"<p>Before I forget, to get the nice horizontally-scolling code block in my previous post, I had to added the following to my wordpress theme&#8217;s style.css:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.hentry code {\r\n  display: block;\r\n  background: lightgrey;\r\n  padding: 10px;\r\n  overflow: auto;\r\n}\r\n<\/pre>\n<p>Then I can get the nice boxes by surrounding code snippets with both pre and code blocks.  pre gets me monospaced font, a theme-consistent font size, etc.  code gets me the scrolling and the grey background.<\/p>\n<p>Oh, I did also comment out the &#8220;<code>letter-spacing: -1px;<\/code>&#8221; from my theme&#8217;s pre definition, it made the code look squished.<\/p>\n<p>Got pointed in the right direction by <a href='http:\/\/www.inficone.com\/technology\/how-to-display-csshtmlphpruby-code-snippets-inside-wordpress-post\/597\/'>these<\/a> <a href='http:\/\/codex.wordpress.org\/Writing_Code_in_Your_Posts'>two<\/a> sites.<\/p>\n<p>Since I will not be able to remember in the future: wp-content\/themes\/clean-home\/style.css<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before I forget, to get the nice horizontally-scolling code block in my previous post, I had to added the following to my wordpress theme&#8217;s style.css: Then I can get the nice boxes by surrounding code snippets with both pre and &hellip; <a href=\"https:\/\/www.jetmore.org\/john\/blog\/2011\/08\/horizontal-scrolling-in-code-blocks\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/posts\/65"}],"collection":[{"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":1,"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions\/537"}],"wp:attachment":[{"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jetmore.org\/john\/blog\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}