I have a series of buttons that when click display a text, each button has a border-bottom
, I want to make all the buttons have that border minus the last one.
This is my code:
<div class="collapse-container">
<button class="collapsible">Primer boton</button>
<p>Primer Texto</p>
<button class="collapsible">Segundo boton</button>
<p>Segundo Texto</p>
<button class="collapsible">Tercer boton</button>
<p>Tercer Texto</p>
</div>
My css is as follows:
.collapsible{
background-color: white;
transition: border-bottom 1s, background-color .6s;
cursor: pointer;
padding-bottom: 20px;
padding-top: 2%;
width: 100%;
border-style: none;
border-bottom: 1px solid #707070;
text-align: left;
font-size: 15px;
}
.collapse-container button:last-child p{border-bottom: none;}
Any idea why it does not work?