Skip to content Skip to sidebar Skip to footer

CSS Grid Or Columns?

So I have already got my mobile version of my website laid out (see sketch below) but now I am having trouble trying to achieve my envision goal for my desktop version. I did a qu

Solution 1:

put your picture and text in a div respectively and give that div below css

.parent{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
 }
 .parent div{
 height:200px;
 width:300px;}
 
 .img img{
  width:100%;
  height:100%;
 }
 
  
<div class="parent">
<div class="image">
<img src="https://cdn.colorlib.com/shapely/wp-content/uploads/sites/12/2016/03/photo-1447834353189-91c48abf20e1-1-1.jpg"
          alt="">
</div>
<div class="text">
<h2>About Us</h2>
          <p>Usage of the Internet is becoming more common due to rapid advancement of technology and the power of
            globalization. Societies are becoming more inter-connected. Thoughts from different</p>
            <a href="">READ MORE</a>

</div>
</div>

}


Post a Comment for "CSS Grid Or Columns?"