WP-Mix

A fresh mix of code snippets and tutorials

CSS Dark Pre Tag Styles

Here is a quick CSS snippet for adding some smooth, dark styles to any <pre> tag. One-step snippet for complete pre styling: add to your stylesheet and done.

body { background-color: #333; }
pre { 
	margin: 20px; padding: 20px; 
	color: #aaa; background-color: #222;
	white-space: pre; text-shadow: 0 1px 0 #000;
	border-radius: 15px; border-bottom: 1px solid #555;
	box-shadow: 0 1px 5px rgba(0,0,0,0.4) inset, 0 0 20px rgba(0,0,0,0.2) inset;
	font: 16px/24px 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
	}

Customize to suit your specific design goals and/or to match your current theme. Note that the body background-color is optional.

Related

★ Pro Tip:

Digging Into WordPressGA Pro