Saturday 10 October 2015

Common Code Highlighter CSS code

If you want to highlight any code section web page the give code might help you to create code section on page. This css script might be useful to all - It is not for syntax highlighting but works well for presenting the source code in original format :

       

 <pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; 
                color: #000000; background-color: #eee;
                font-size: 12px; border: 1px dashed #999999;
                line-height: 14px; padding: 5px; 
                overflow: auto; width: 100%">
       <code style="color:#000000;word-wrap:normal;">
            <<<<<<< CODE WILL BE HERE>>>>>>>
       </code>
 </pre>

How to use CSS Code highlighter? 
Ans: Paste this snippet in text editor, paste your code in <<<<<<>>>>>> block. Copy all and paste to HTML view in blogger(or any other) post editor.

Advantage: Simple and easy to use, less configuration, easy to reconfigure, no extra software, no plugin :)