Back to CSS Tips
Preview: what the working site looks like.
subdiv1 subdiv2 subdiv3 subdiv4
subdiv1
subdiv2
subdiv3
subdiv4
The markup
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		
<title>Title</title>
</head>
<body> 
    
subdiv1 subdiv2 subdiv3 subdiv4
subdiv1
subdiv2
subdiv3
subdiv4
</body> </html>
The CSS
 

html, body {
	font: 100% "Comic Sans MS";
	background: #FC6;
}
* {
	margin: 0;
	padding: 0;
	border: none;
}
#container {
	width: 800px;
	margin: 30px auto;
	background: #999;
	overflow: auto;
	font-size: 0.8em;
}
#one, #two, #three, #four {
	line-height: 30px;
	padding: 5px 10px;
	background: #ffc;
}
	#one:hover, #two:hover, #three:hover, #four:hover {background: #fff;}
		#subdiv1, #subdiv2, #subdiv3, #subdiv4 {
			height: 100px;
			padding: 90px 0 0;
			display: none;
			text-align: center;
		}
			#subdiv1 {
				display: block;
				background:#f00;
			}
			#subdiv2 {background: #00f;}
			#subdiv3 {background: #0f0;}
			#subdiv4 {
				color: #fff;
				background: #000;
			}
#popped {
	background: #ccc;
}