I'm having an issue with my accordion headings not starting on a new line, even though I've applied
word-wrap: break-word !important;
. The text is currently overflowing the card in a strange way, which is causing problems for mobile devices. I would appreciate some insight from the SO community to help me identify where I might be going wrong.
Thanks
#accordion-style-1 h1,
#accordion-style-1 a {
color: #0E112B;
word-wrap: break-word !important;
}
#accordion-style-1 h5 .btn-link {
font-weight: 400;
color: #0E112B;
background-color: transparent;
text-decoration: none !important;
font-size: 18px;
word-wrap: break-word !important;
font-weight: bold;
padding-left: 25px;
width:100% !important;
}
#accordion-style-1 .card-body {
border-top: 2px solid #0E112B;
display:block;
}
#accordion-style-1 .card-header .btn.collapsed .fa.main {
display: none;
}
#accordion-style-1 .card-header .btn .fa.main {
background: #0E112B;
padding: 13px 11px;
color: #ffffff;
width: 35px;
height: 41px;
position: absolute;
left: -1px;
top: 10px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
display: block;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css"
integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ"
crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js'
integrity='sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q
crossorigin='anonymous</script>
<script src='https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js'
integrity='sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl
crossorigin='anonymous'></script>
<div class='container'>
<div class='row justify-content-between'>
<div class='col-md-6 my-auto col-12'>
<div class='col-12 mx-auto' id='accordion-style-1'>
<div class='accordion' id='accordionExample'>
<div class='card'>
<div class='card-header' id='headingOne'>
<h5 class='mb-0'>
<button class='btn btn-link btn-block text-left' type='button' data-toggle='collapse' data-target='#collapseOne' aria-expanded='true' aria-controls='collapseOne'>
<i class='fa fa-calendar main'></i><i class='fas fa-angle-double-right mr-3'></i>How do I send an send reminders through pigs flying??
</button>
</h5>
</div>
<div id="collapseOne" class="collapse show fade" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS
</div>
</div>
</div>
...other cards omitted for brevity...
</div>
</div>
</div>
</div>
</div>