How to create responsive table using HTML and CSS

We will create a responsive table using HTML and CSS.

We are going to create a responsive table with html and css.
it will show the price in a responsive with the sing up button.

Here is the table:



The source code:



<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=
device-width, initial-scale=1.0">
<style>
* {
    box-sizing: border-box;
}




.columns {
    float: left;
    width33.3%;
    padding8px;
}

.price {
    list-style-type: none;
    border1px solid #eee;
    margin0;
    padding0;
    -webkit-transition0.3s;
    transition0.3s;
}



.price:hover {
    box-shadow0 8px 12px 0
    rgba(0,0,0,0.2)
}

.price .header {
    background-color: #111;
    color: white;
    font-size25px;
}

.price li {
    border-bottom1px solid #eee;
    padding20px;
    text-align: center;
}

.price .grey {
    background-color: #eee;
    font-size20px;
}

.button {
    background-color: #48d1cc;
    border: none;
    color: white;
    padding10px 25px;
    text-align: center;
    text-decoration: none;
    font-size18px;
}



@media only screen and
(max-width600px) {

    .columns {
        width100%;
    }
}

</style>
</head>

<body>

<h2>Responsive Pricing Tables</h2>




<div class="columns">
 <ul class="price">
  <li class="header"
  style="background-color:

  #48d1cc">Pro</li>

   <li class="grey">₹ 1800 / year
   </li>

   <li>25GB Storage</li>
   <li>25 Emails</li>
   <li>25 Domains</li>
   <li>24GB Bandwidth</li>
   <li class="grey"><a href="#"
   class="button">

   Sign Up</a></li>
  </ul>
</div>

<div class="columns">
  <ul class="price">
   <li class="header" >Premium</li>
   <li class="grey">₹ 4000 / year
   </li>

   <li>80GB Storage</li>
   <li>80 Emails</li>
   <li>80 Domains</li>
   <li>40GB Bandwidth</li>
   <li class="grey"><a href="#"
   class="button">

   Sign Up</a></li>
  </ul>
</div>

</body>
</html>

Comments

Popular posts from this blog

Getting Started with JavaScript

JavaScript fundamentals

How to create a list group with css