I'm having a little bit of an issue with an unordered list inside a collapsible content div
. While the div
is collapsing, The list appears without any styling; But, after the div
finishes collapsing all the way, my css takes over and it displays with styling.
I will add my entire code here. If you click on "My Routes" you'll understand what I'm talking about. It's kinda tricky to explain.
Thanks, Richard.
* {
font-family: 'Roboto', sans-serif;
}
/* Every CSS rule for the Sidebar and it's contents */
.sidebar {
height: 100vh;
background-color: #fff;
}
.collapse {
font-size: 14px;
}
.collapse ul {
margin: 0;
padding: 0;
list-style-type: none;
}
.collapse ul li {
padding: 7px;
border-radius: 4px;
border-bottom: 1px solid #E2E6EA;
}
.collapse ul li:hover {
background-color: #e2e6ea;
}
.collapse i {
cursor: pointer;
margin-left: 10px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" integrity="sha384-KA6wR/X5RY4zFAHpv/CnoG2UW1uogYfdnP67Uv7eULvTveboZJg0qUpmJZb5VqzN" crossorigin="anonymous"><!-- jQuery first, then Popper.js, then Bootstrap JS --><script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script><div class="container-fluid"><div class="row"><div class="sidebar col-3"><button type="button" class="btn btn-light btn-md btn-block" data-toggle="collapse" data-target="#myroutes">My Routes</button><div id="myroutes" class="collapse"><div class="mt-4 mb-4"><ul><li>
10/29/19 - Montgomery & Butler County<i class="far fa-edit"></i><i class="far fa-trash-alt"></i></li><li>
10/12/19 - Clinton & Highland County<i class="far fa-edit"></i><i class="far fa-trash-alt"></i></li><li>
10/05/19 - Indiana<i class="far fa-edit"></i><i class="far fa-trash-alt"></i></li></ul></div></div></div></div></div>