"Panel With List Group"
Bootstrap 3.0.3 Snippet by BhaumikPatel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
Panel Default</h3>
</div>
<ul class="list-group">
<a href="#" class="list-group-item">Cras justo odio</a>
<a href="http://www.jquery2dotnet.com/2014/01/two-way-scrolling-in-single-div.html" class="list-group-item active">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item">Morbi leo risus</a>
<a href="#" class="list-group-item">Porta ac consectetur ac</a>
<a href="#" class="list-group-item">Vestibulum at eros</a>
</ul>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
Panel Primary</h3>
</div>
<ul class="list-group">
<a href="#" class="list-group-item">Cras justo odio</a>
<a href="http://www.jquery2dotnet.com/2014/01/jquery-export-table-data-into-ms-excel.html" class="list-group-item active">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item">Morbi leo risus</a>
<a href="#" class="list-group-item">Porta ac consectetur ac</a>
<a href="#" class="list-group-item">Vestibulum at eros</a>
</ul>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
body
{
padding-top: 20px;
background-color: #F7F7F7;
}
.panel > .list-group
{
margin-bottom: 0;
}
.panel > .list-group .list-group-item
{
border-width: 1px 0;
}
.panel > .list-group .list-group-item:first-child
{
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.panel > .list-group .list-group-item:last-child
{
border-bottom: 0;
}
.panel-heading + .list-group .list-group-item:first-child
{
border-top-width: 0;
}
.panel-default .list-group-item.active
{
color: #000;
background-color: #DDD;
border-color: #DDD;
}
.panel-primary .list-group-item.active
{
color: #FFF;
background-color: #428BCA;
border-color: #428BCA;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

david zamora it doesn't stop it from working ..

Oga Ose () - 10 years ago - Reply 0


Hi! dude you forgot to add <li></li> to every ul.list-group

disqus_FIPSus5rM0 () - 10 years ago - Reply 0


it doesn't stop it from working since they are all links.

Oga Ose () - 10 years ago - Reply 0


http://www.w3.org/TR/html-m... the last link is from html4 but this is html5, it's the same since the beggining of times

disqus_FIPSus5rM0 () - 10 years ago - Reply 0


http://www.w3.org/TR/html4/... (All lists must contain one or more list elements.) It works, but it isn't right. Even though, there could be people adding styles to their lists <li>, and this would result in a malformation of their DOM

disqus_FIPSus5rM0 () - 10 years ago - Reply 0