Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to give transparent background to bootstrap list group?

I want to give a transparent background to a list group with only top border. Right now I get the default white background.

 <ul class="list-group">
     <li class="list-group-item">Cras justo odio</li>
     <li class="list-group-item">Dapibus ac facilisis in</li>
     <li class="list-group-item">Morbi leo risus</li>
     <li class="list-group-item">Porta ac consectetur ac</li>
     <li class="list-group-item">Vestibulum at eros</li>
 </ul>
like image 926
shahana hamza Avatar asked Aug 22 '17 10:08

shahana hamza


2 Answers

<ul class="list-group  bg-transparent">
 <li class="list-group-item  bg-transparent">Cras justo odio</li>
 <li class="list-group-item  bg-transparent">Dapibus ac facilisis in</li>
 <li class="list-group-item  bg-transparent">Morbi leo risus</li>
 <li class="list-group-item  bg-transparent">Porta ac consectetur ac</li>
 <li class="list-group-item  bg-transparent">Vestibulum at eros</li>

like image 187
Husnul Jahneer Avatar answered Sep 28 '22 18:09

Husnul Jahneer


you can try this, it will work. Its easy may be you did not even tried.

.list-group-item {
background-color: transparent;
border-top: 1px solid #ddd;
border-radius: 0;
color: #fff;
}
like image 25
Awsme Sandy Avatar answered Sep 28 '22 19:09

Awsme Sandy