div#gallery {
	outline: 1px solid #444;
	overflow: hidden;
}

div#gallery > div {
	width:50%;
	float: left;
}
div#gallery > div:nth-child(2n+1) {
	clear:left;
}
div#gallery > div:active {
	color: #000;
	background-color: #AAA; 
}
div#gallery > div:hover {
	color: #000;
	background-color: #AAA;
}

div#gallery * a {
	display: inline-block;
}

div#gallery * img {
	width: 90%;
	margin: 5%;
    display:inline;
}

div#gallery * p {
	margin: 5%;
	margin-top: -5%;
	margin-bottom: 1%;
}