traviblog

just some sort of lame blog

Brilliant CSS for the KBD element

Stack Overflow recently implemented some brilliant CSS for <kbd> tags:

kbd
{
	padding: 5px 3px;
	white-space: nowrap;
	color: #000;
	background-color: #EEE;
	border-top: solid 2px #CCC;
	border-right: solid 4px #AAA;
	border-bottom: solid 5px #888;
	border-left: solid 3px #BBB;
}

There's something inherently beautiful about CSS used to style HTML to look like the physical object it represents.

Example: CTRL+C

Comments

comments powered by Disqus