Return to Snippet

Revision: 23822
at February 14, 2010 15:41 by Ateneae


Initial Code
<style type="text/css">
			body {
				padding-left:100px;
				padding-top:100px;
			}
			
			h2 {
				line-height:1.15;
				font-size:2.2em;
				color:#fff;
				text-transform:uppercase;
				font-family:sans-serif;
				width:6em;
			}
			
			.uniform-bg {
				background:red;
				position:relative;
				outline: red solid 0.3em;
				-moz-outline-offset:-0.04em;
			}
			
			.uniform-bg span {
				position:relative;
			}
		</style>
		<!--[if lte IE 7]>
			<style type="text/css">
				h2 {
					border-left:0.3em solid red;
					padding-top:1px;
				}
				
				.uniform-bg span {
					padding-right:0.3em;
				}
			</style>
		<![endif]-->
[HTML]
<h2><span class="uniform-bg"><span>Hello everyone</span></span></h2>

Initial URL
http://www.ajaxline.com/the-even-background-under-the-text

Initial Description
Add background-color to headings

Initial Title
Background-Color Heading HMTL

Initial Tags
text

Initial Language
CSS