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

How to fix a div from undesired expansion at different responsive sizes?

I'm betting this is something super simple and I'm just not seeing it. I'm also a newbie.

my div .text-container starts expanding outside of my image div when decreasing the browser size to mobile.

How can I fix this?

.proj-thumb-container{
      position:relative;
      display: block;
      max-width:100%;
      min-width: 0;
      background:none;
      margin-left: 0%;
      overflow: hidden;
    }

.text-container {
        float: left;
        display: inline-block;
        position: fixed;
        left: 50px;
        width: 30%;
        height: 75%;
        max-width: 100%;
        background-color: #082ED0;
        padding-top: 45px;
        overflow: hidden;
    }
<div class="proj-thumb-container">

            <div class="text-container">

            <h1>
              TASMEEM 2013
            </h1>
              <span>aalsdkjf alkja fl;akdkw alad;djkjfea a d al;sdf ad s a</span>
              </div> 


            <div class="shuffle-me">

              <div class="images">

              <img src="IMG_4101.jpg">
              <img src="IMG_4101.jpg">
              <img src="DSC_4546.jpg">
              <img src="DSC_3899.jpg">
            </div>

          </div>

1 Answer

Hi Dan Sinclair, I would like to help you, please explain me a little bit more accurate what do you want to achieve.

Please, be aware of putting the html closing tags to your divs as well :-)