Last active
August 29, 2015 14:23
-
-
Save gnought/af339503ed1f2e1602fa to your computer and use it in GitHub Desktop.
Bootstrap - list-group-addon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="http://ajax.aspnetcdn.com/ajax/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.3.min.js"></script> | |
<script src="http://ajax.aspnetcdn.com/ajax/bootstrap/3.3.4/bootstrap.min.js"></script> | |
<style> | |
.list-group-addon { | |
position: absolute; | |
top: 0; | |
bottom:0; | |
z-index: 2; | |
display: block; | |
text-align: center; | |
pointer-events: none; | |
padding: 12px 0px; | |
line-height: 1; | |
color: #555555; | |
text-align: center; | |
background-color: #eee; | |
border-radius: 4px; | |
white-space: nowrap; | |
width: 40px; | |
} | |
.list-group-addon:first-child { left:0; border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; } | |
.list-group-addon:last-child { right:0; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; } | |
.list-group-item-cust { | |
padding-left: 55px; /* 40px + 15px */ | |
padding-right: 55px; | |
} | |
/*ol a.list-group-item { | |
list-style: decimal inside; | |
display: list-item; | |
}*/ | |
</style> | |
<div class="container"> | |
<ol id="list list-group"> | |
<a class="list-group-item-cust list-group-item col-xs-6 col-sm-4 col-md-2" href="#"> | |
<span class="list-group-addon">1</span>Row1<span class="list-group-addon">1a</span> | |
</a> | |
<a class="list-group-item-cust list-group-item col-xs-6 col-sm-4 col-md-2" href="#"> | |
<span class="list-group-addon">2</span>Row2 | |
</a> | |
<a class="list-group-item col-xs-6 col-sm-4 col-md-2" href="#">Row3</a> | |
<a class="list-group-item col-xs-6 col-sm-4 col-md-2" href="#">Row4</a> | |
<a class="list-group-item col-xs-6 col-sm-4 col-md-2" href="#">Row5</a> | |
</ol> | |
</div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment