Last active
December 25, 2015 05:49
-
-
Save n00b2pr0/6927440 to your computer and use it in GitHub Desktop.
Snippet for Pagination in Panel Components Heading and Footer in Bootstrap 3
This file contains 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
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title pull-left">Panel title</h3> | |
<ul class="pagination pagination-panel pull-right"> | |
<li><a href="#">«</a></li> | |
<li class="active"><a href="#">1</a></li> | |
<li><a href="#">2</a></li> | |
<li><a href="#">3</a></li> | |
<li><a href="#">4</a></li> | |
<li><a href="#">5</a></li> | |
<li><a href="#">»</a></li> | |
</ul> | |
<div class="clearfix"></div> | |
</div> | |
<div class="panel-body"> | |
Panel Content | |
<hr> | |
Panel Content | |
<hr> | |
Panel Content | |
</div> | |
<div class="panel-footer"> | |
Panel Footer | |
<ul class="pagination pagination-panel pull-right"> | |
<li><a href="#">«</a></li> | |
<li class="active"><a href="#">1</a></li> | |
<li><a href="#">2</a></li> | |
<li><a href="#">3</a></li> | |
<li><a href="#">4</a></li> | |
<li><a href="#">5</a></li> | |
<li><a href="#">»</a></li> | |
</ul> | |
<div class="clearfix"></div> | |
</div> | |
</div> |
This file contains 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
.panel-heading .pagination-panel, | |
.panel-footer .pagination-panel { | |
margin: -11px -16px; /* Based off default .panel-heading padding */ | |
> li { | |
> a, | |
> span { | |
padding: 10px 18px; /* Based off default .panel-heading padding */ | |
} | |
} | |
} | |
.panel-heading .pagination-panel { | |
> li { | |
&:last-child { | |
> a, | |
> span { | |
border-bottom-right-radius: 0; | |
} | |
} | |
} | |
} | |
.panel-footer .pagination-panel { | |
> li { | |
&:last-child { | |
> a, | |
> span { | |
border-top-right-radius: 0; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment