Sunday, September 12, 2010

Custom CSS for Code

A long time has pasted since I last did anything related to web development. I'm using a pre built template but I wanted to add my own style for code snippets and commands. Here is what I used:
#code{
background-color: #555555;
border: 1px dashed #999999;
padding: 5px;
overflow: auto;
font-size: 11px;
margin: 10px}
Once you have your css you can use <div> apply your style to your text:
<div id="code">This is code</div>

No comments:

Post a Comment