Responsive Pricing Card Design using HTML & CSS

Responsive Pricing Card Design using HTML & CSS


Hello developers, today in this blog you'll learn to create a Responsive Pricing Card Design using HTML & CSS.

A pricing card is the flat card design of a particular product with its different prices and offers for the buyers. Pricing cards can be various products like laptops, computers, mobile phones, hosting, and others.

In this blog (Responsive Pricing Card), there is a card of pricing list with a bisect that has different offers and prices. The card has the package name and the price and duration of the product and the details of it. Below it, there is a button with a different hover effect.


Every card has different values and features for the same product. This page [Responsive Pricing Card], is made responsive by using media query.    


The source code of this Responsive Pricing Card Design is given below, if you want the source code of this program, you can copy it. You can use this Responsive Pricing Card code with your creativity and can take this card to the next level.


Responsive Pricing Card [Source Code]


To make this website (Responsive Pricing Card), you need to create 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>Price card || Learningrobo</title> <link rel="stylesheet" href="style.css"> </head> <body> <h3>Learningrobo</h3> <div class="container"> <div class="basic"> <h2>Basic</h2> <h4>Free</h4> <h6>3,000 monthly visitors</h6> <ul class="basic-ul"> <li class="basic-li">Limited Reports</li> <li class="basic-li">Unlimited Projects</li> <li class="basic-li">Data storage for 1 year</li> </ul> <button class="basic-btn">Start now</button> </div> <div class="pro"> <h2>Pro</h2> <h4>$19 / month</h4> <h6>10,000 monthly visitors</h6> <ul class="pro-ul"> <li class="pro-li">Unlimited Reports</li> <li class="pro-li">15-day free trial</li> <li class="pro-li">Data storage for 3 years</li> </ul> <button class="pro-btn">Try it</button> </div> </div> </body> </html>

CSS provides style to an HTML page. To make the page attractive create a CSS file with the name style.css and remember that you have to create a file with a .css extension.


:root{
    --bg-clr: #56ab2f;
    --card-clr: #22161A;
    --text-clr: #fdfdfd;
    --partition-clr: #56ab2f;
  }
  
  *, *::before, *::after{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
  
  body{
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    background: #56ab2f; 
background: -webkit-linear-gradient(to right, #a8e063, #56ab2f);  
background: linear-gradient(to right, #a8e063, #56ab2f); 
    color: var(--text-clr);
  }
  
  .container{
    margin: 2em auto;
    width: 60%;
    background: var(--card-clr);
    padding: 5em 2em;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .basic, .pro{
    padding: 1em 4em;
  }
  
  .basic{
    border-right: 1px solid var(--partition-clr);
  }
  
  h2{
    font-size: 2.25rem;
    color:#a8e063
  }
  
  h4{
    font-size: 1.5rem;
    margin-top: 1em;
    
    
  }
  h3{
      margin-top: 15px;
    font-size: 1.8rem;
    text-align: center; 
    color: #22161A;
  }
  h6{
    font-size: 1rem;
    color:#a8e063
  }
  
  ul{
    font-size: 1.125rem;
    margin-top: 2em;
    margin-left: 1em;
    line-height: 2rem;
  }
  
  .basic-btn, .pro-btn{
    width: 100%;
    border: none;
    padding: 0.8em 1.5em;
    margin: 2em 0 0 0;
    background: var(--bg-clr);
    color: var(--text-clr);
    font-size: 1.125rem;
    border-radius: 5px;
    cursor: pointer;
  }
  
  .basic-btn{
    background: transparent;
    color: var(--bg-clr);
   
  }

  .basic-btn:hover{
    background: var(--bg-clr);
    color: #000;
    
  }

  .pro-btn{
    color:#000;
  }
  .pro-btn:hover{
    background: var(--card-clr);
    color: var(--bg-clr);
  }


  @media screen and (max-width: 900px) {
    .container{
        flex-direction: column;
        margin: 2em auto;
        width: 90%;
    }
    .basic{
        border-right:none;
        border-bottom: 1px solid var(--partition-clr);
    }
  }


We hope you would like this Responsive Pricing Card Design using HTML & CSS.

Thank you for reading our blog. If you face any problem in creating this Responsive Pricing Card Design 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

إرسال تعليق

Thank you
Learning robo team

Post a Comment (0)

أحدث أقدم
Learning Robo says...
code copied
Welcome