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 trial

CSS

Sticking Flex item to the bottom of the div in Bootstrap

I've used thimble for this hope you can experiment it https://thimbleprojects.org/hazalg/372883/

.exp-text just doesn't stick to the bottom of the jumbotron background image. Background image is seen behind the exp-text. I' ve tried .mb-0, margin-bottom:0 !important and even translateY() It would be great if someone could figure the problem out

HTML

<!-- jumbotron -->
<div class="jumbotron jumbotron-fluid  d-flex flex-column justify-content-end  ">
    <div class="container-fluid">
         <h1 class="display-1"> Main Header</h1>
     </div>
     <div class="container-fluid exp-text ">
         <h3>Explanatory text sticks to the jumbotron bottom </h3>
     </div>
</div>
<!-- /jumbotron -->      

CSS

.jumbotron{
       min-height: 100%;
       min-height: 100vh;
       background: url("");
       background-size: cover;
       background-position: center;
}
.exp-text{
      background: orange;
}

Sorry Hazel, but I am not entirely sure why those would not work. Maybe you could post a screen shot of your workspace so we can experiment on it?

Hi Caleb, I've added the workspace hope it works

1 Answer

It works thanks:)