Responsive Testimonials Section using HTML & CSS

Responsive Testimonials Section using HTML & CSS

Hello developers, today in this blog, you'll learn how to create a Responsive Testimonials Section using HTML & CSS.

A testimonial is a card with a statement that comments on the success of how good someone or something is. Testimonials help the user to build trust in the product. The testimonials card may contain the person's name, profile picture, and some statement with a star rating.

In this Responsive Testimonials Section, there are three testimonial cards with a statement, star rating, name of the person, and the person's profile icon. Each testimonials card has a profile icon at the top, the name of the person which is followed by a star rating, and some content about the person.

The box-shadow has been provided to every testimonials card. The border-radius property has been used in every card to make the rounded corners.

This Testimonials Section is fully responsive for any device which is made by using CSS media query property. On the PC, these testimonial cards are horizontally visible, but on the mobile screen, these cards are vertically visible. That is arranged one after the other.

The source code of this Responsive Testimonials Section using HTML & CSS is given below, if you want the source code of this program, you can copy it. You can use this Responsive Testimonials Section code on your projects.

Responsive Testimonials Section using HTML & CSS [Source Code]

To make this website, you would like to make two files: an HTML file & a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.

<!DOCTYPE html> <html> <head> <title>Resposive testimonial card || Learning Robo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"> </head> <body> <div class="testimonials"> <div class="inner"> <h1>Testimonials</h1> <div class="border"></div> <div class="row"> <div class="col"> <div class="testimonial"> <img src="https://cdn.pixabay.com/photo/2018/11/13/21/43/instagram-3814049__340.png" alt=""> <div class="name">Full name</div> <div class="stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> </div> <p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, </p> </div> </div> <div class="col"> <div class="testimonial"> <img src="https://cdn.pixabay.com/photo/2018/11/13/21/43/instagram-3814049__340.png" alt=""> <div class="name">Full name</div> <div class="stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="far fa-star"></i> <i class="far fa-star"></i> </div> <p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, </p> </div> </div> <div class="col"> <div class="testimonial"> <img src="https://cdn.pixabay.com/photo/2018/11/13/21/43/instagram-3814049__340.png" alt=""> <div class="name">Full name</div> <div class="stars"> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="fas fa-star"></i> <i class="far fa-star"></i> </div> <p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, </p> </div> </div> </div> </div> <div class="credit">Made with <span style="color:tomato">&#10084;</span> by <a href="https://www.learningrobo.com/">Learning Robo</a></div> </div> </body> </html>
CSS provides style to an HTML page. To make the page attractive and page responsive create a CSS file with the name style.css and remember that you have to make a file with a .css extension.


*{
    margin: 0;
    padding: 0;
    font-family: "montserrat",sans-serif;
  }
  body{
    background-color: #FBAB7E;
    background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);
    
  }
  .testimonials{
    padding: 40px 0;
    color: #434343;
    text-align: center;
  }
  .inner{
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
  }
  
  .border{
    width: 160px;
    height: 5px;
    background: #000;
    margin: 26px auto;
  }
  
  .row{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .col{
    flex: 33.33%;
    max-width: 33.33%;
    box-sizing: border-box;
    padding: 15px;
  }
  .testimonial{
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  }
  .testimonial img{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  }
  .name{
    font-size: 20px;
    text-transform: uppercase;
    margin: 20px 0;
  }
  .stars{
    color: #000;
    margin-bottom: 20px;
  }
  
  
  @media screen and (max-width:960px) {
  .col{
    flex: 100%;
    max-width: 80%;
  }
  }
  
  @media screen and (max-width:600px) {
  .col{
    flex: 100%;
    max-width: 100%;
  }
  }
  .credit{
    text-align: center;
    color: #000;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.credit a{
    text-decoration: none;
    color:#000;
    font-weight: bold;
}  
We hope you would like this Responsive Testimonials Section using HTML & CSS.

Thank you for reading our blog. If you face any problem in creating this Responsive Testimonials Section using HTML & CSS, then contact us or comment us. We’ll try to provide a solution to your problem as soon as possible.

Thank you
Learning robo team

Post a Comment

Thank you
Learning robo team

Post a Comment (0)

Previous Post Next Post
Learning Robo says...
code copied
Welcome