Badges in Bootstrap

Add the badges component to any list group item and it will automatically be positioned on the right.

<!DOCTYPE html>
<html lang="en">
<head>
<link href="css/bootstrap.css" rel="stylesheet">
<script	src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</head>

<body>
	<div class="container">
		<div id="content">
			<ul class="list-group">
				<li class="list-group-item"><span class="badge">14</span> Cras
					justo odio</li>
				<li class="list-group-item"><span class="badge">2</span>
					Dapibus ac facilisis in</li>
				<li class="list-group-item"><span class="badge">1</span> Morbi
					leo risus</li>
			</ul>
		</div>
	</div>
</body>
</html>

Output

Untitled

Share

You may also like...