Friday, February 28, 2020

Our Services - HTML CSS Source Codes

---------------------------------------------HTML Code----------------------------------------------

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
  <body>
    <div class="services">
      <h1>Our Services</h1>
      <div class="cen">
        <div class="service">
          <i class="fas fa-anchor"></i>
          <h2>Service Name</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        </div>

        <div class="service">
          <i class="fab fa-android"></i>
          <h2>Service Name</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        </div>

        <div class="service">
          <i class="fab fa-angellist"></i>
          <h2>Service Name</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        </div>

        <div class="service">
          <i class="fas fa-apple-alt"></i>
          <h2>Service Name</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        </div>

        <div class="service">
          <i class="fas fa-archway"></i>
          <h2>Service Name</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        </div>

        <div class="service">
          <i class="far fa-angry"></i>
          <h2>Service Name</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
        </div>
      </div>
    </div>
  </body>
</html>
---------------------------------------------CSS Code-----------------------------------------------
body{
  margin: 0;
  padding: 0;
  font-family: "montserrat",sans-serif;
}
.services{
  background: #f1f1f1;
  text-align: center;
}
.services h1{
  display: inline-block;
  text-transform: uppercase;
  border-bottom: 4px solid #3498db;
  font-size: 20px;
  padding-bottom: 10px;
  margin-top: 40px;
}
.cen{
  max-width: 1200px;
  margin: auto;
  overflow: hidden;
  padding: 20px;
}
.service{
  display: inline-block;
  width: calc(100% / 3);
  margin: 0 -2px;
  padding: 20px;
  box-sizing: border-box;
  cursor: pointer;
  transition: 0.4s;
}
.service:hover{
  background: #ddd;
}
.service i{
  color: #3498db;
  font-size: 34px;
  margin-bottom: 30px;
}
.service h2{
  font-size: 18px;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
}
.service p{
  color: gray;
  font-size: 15px;
  font-weight: 500;
}
@media screen and (max-width: 800px) {
  .service{
    width: 50%;
  }
}
@media screen and (max-width: 500px) {
  .service{
    width: 100%;
  }
}
 

No comments:

Post a Comment