I have an accordion that I've added rounded corners to, however, each time I open up an element within the accordion, the padding that I've added to include the rounded corners gets attached to the inside of the accordion element. Can anyone consult me on how to get rid of this padding?
CSS:
.accordion {
background-color:#000;
border-radius:10px;
padding:10px
}
.accordion dt {
padding:.5em;
background-color:#456db5;
cursor:pointer;
border-bottom:1px solid #355faa;
font-size:13px
}
.accordion dt:hover {
color:#fff
}
.accordion .on {
background-color:#456db5;
cursor:default
}
.accordion dt,.accordion .on:hover {
color:#fff
}
.accordion dd {
padding-left:1em;
margin:0 auto;
padding-right:.5em;
background-color:#fff;
font-size:14px
}
.accordion dd p {
padding-top:.5em;
padding-bottom:.5em
}
HTML:
<dl class="accordion">
<dt>Headline</dt>
<dd>
<p>Text</p>
</dd>
</dl>
Picture: