Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Bootstrap 4 Basics (Retired) Building Forms with Bootstrap Custom CSS

Weird 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>