Add CSS for showing Source Code in blogger


If you want to have your blog on blogger, to show source code in a nice way.


  • Goto https://www.blogger.com/
  • Select Theme
  • Select Customize
  • Select Add CSS on dropdown under Advanced
  • Paste the following CSS
  • Now you can insert your code in <pre> </pre> tags in your posts. 


pre {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-left: 3px solid #f36d33;
    color: #666;
    page-break-inside: avoid;
    font-family: 'Source Code Pro', monospace;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 1.6em;
    max-width: 100%;
    overflow: auto;
    padding: 1em 1.5em;
    display: block;
    word-wrap: break-word;
}

Comments

Popular posts from this blog

Pimp your Gtk application with CSS

Using Sass in Visual Studio Code