Return to Snippet

Revision: 12870
at March 30, 2009 23:03 by hotdiggity


Initial Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Vertical align text and image within an unordered list</title>
		<style>
		
		ul {
			margin: 10px;
			list-style-type: none;
		}

		ul li {
			font-size: 20px;
			padding: 0;
			margin-top: 10px;
			margin-bottom: 10px;
		}

		img {
			margin-right: 5px;
			vertical-align: middle;
			border: 1px solid #ccc;
			height: 30px;
			width: 30px;
		}

		ul li a {
			text-decoration: none
		}
		</style>
	</head>
	<body>
		<ul>
			<li><a href="#"><img src="" />Text link 1</a></li>
			<li><a href="#"><img src="" />Test link 2</a></li>
			<li><a href="#"><img src="" />Text link 3</a></li>
			<li><a href="#"><a href="#"><img src="" />Text link 4</a></li>
			<li><a href="#"><img src=""/>Text link 4</a></li>
		</ul>
	</body>
</html>

Initial URL

                                

Initial Description
Still needs a little padding at top.

Initial Title
Vertical align text and image within an unordered list

Initial Tags

                                

Initial Language
HTML