Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmaxpurdy2
6,752 PointsWeird behaviour after collapsing, <span> moves next to the div. Help!
I've been trying to insert the thumbnail in the Schedule.
I've added a media object wrapping around the thumbnail and the content. But, once I've down that the <span> moves next to the content when uncollapsed.
Please can somebody help??
Here is a Snapshot of my workspace: https://w.trhou.se/mbjb4vd8mo
Below is the code for the beginning of the Schedule section.
<h1 class="display-4 text-center my-5 text-muted" id="schedules">Schedule</h1>
<ul class="list-group" id="schedule">
<li class="list-group-item list-group-item-action flex-column align-items-start" data-toggle="collapse" data-target="#nodeStradamus" aria-expanded="false" aria-controls="nodeStradamus">
<!--======================================
I SUSPECT THIS DIV IS CAUSING THE PROBLEM
======================================-->
<div class="media">
<img class="rounded-circle thumbnail d-flex mr-3" src="img/avatar-nodestradamus.png" alt="">
<div class="media-body">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Keynote: Internet of Things</h5>
<!-- =============================================
WHEN COLLAPOSED THE SPAN ELEMENT MOVES NEXT
TO THE PREVIOUS DIV, HOW DO I MAKE IT STAY???
===============================================-->
<span class="badge badge-default badge-pill bg-info px-2 py-2 mt-2">9:00am</span>
</div>
<p class="mb-1">Node Stradamus</p>
<div class="collapse" id="nodeStradamus">
<hr class="mb-4">
<p>Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.</p>
</div>
</div>
</div>
</li>