Home > WordPress > Formatting code blocks in a WordPress blog

Formatting code blocks in a WordPress blog

I haven’t found a way I really love to present code in a fixed width WP layout, but the one I use is workable. It produces code that looks like this:

It uses a <code> inside a <pre> with a scrolling option to:

  • preserve indentation
  • use a special font in a quote box to differentiate from other text
  • provide a scroll bar, as code invariably goes past the fixed width

Here is the code (ironically described inside itself):

<pre style="overflow-x: scroll; padding: 10px;"><code>[Your code here]</code></pre>
Categories: WordPress Tags: , ,

windows 7 product key

windows 7 product key

windows 7 key generator

windows 7 key generator

free winrar download

free winrar download

winzip activation code

winzip activation code

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

winrar download free

winrar download free

winzip free download full version

winzip free download full version

windows 7 activation crack

windows7 activation crack

windows 7 crack

windows 7 crack

free winzip

free winzip
\n