0

in chrome the flex box is working perfectly , i have to align an image and text side by side, i have used flex . But in IE the text is not wrapping up.

when i checked need to add a width of 100% to child div , since i have one div for image and another div for content where should i add the width of 100% , i tried another solution for flex:1 or flex-basis:100% neither not worked.

Please see the code

.students-section > div:last-child {
  margin-bottom:0;
}

.student-container{
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.student-container .student-left-container .student-img-container {
    width: 120px;
    height:auto;
    margin-right: 10px;
}

.student-container .student-left-container .student-img-container img{
    max-width: 100%;
    max-height: 100%;
}
<div class="students-section">
<div class="student-container">
  <div class="student-left-container">
    <div class="student-img-container">
      <a target="_blank" href="#">
        <img src="https://studentprivacypledge.org/wp-content/uploads/2016/09/SPP_Pledge_2-1500x900.jpg"/>
      </a>
    </div>
  </div>
  <div class="student-right-container">
    <div class="student-content-container"><p>Lorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem Ipsum</p><div class="student-description">Lorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem Ipsum <a>00:00</a> <a class="check-more" target="_blank" href="#">  Check More</a></div></div>
  </div>
</div>
<div class="student-container">
  <div class="student-left-container">
    <div class="student-img-container">
      <a target="_blank" href="#">
        <img src="https://cdn.pixabay.com/photo/2016/03/07/09/34/kid-1241817_960_720.jpg"/>
      </a>
    </div>
  </div>
  <div class="student-right-container">
    <div class="student-content-container"><p>Lorem Ipsum Lorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem Ipsum</p><div class="student-description">Lorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem IpsumLorem Ipsum  <a>00:00</a> <a class="check-more" target="_blank" href="#"> Check More</a></div></div>
  </div>
</div>
</div>
billy.farroll
  • 1,903
  • 2
  • 15
  • 23
Learner
  • 8,379
  • 7
  • 44
  • 82

0 Answers0