Responsive Business Card Design with modern UI using HTML & CSS

Responsive Business Card Design with modern UI using HTML & CSS

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

A business card is important for every company or working person. Business cards are cards bearing business information about a company or individual. An identity of a specific person or company can be made with the help of a business card. By placing the business card on the web page, the user can contact the company or the owner easily.

In this blog (Responsive Business Card Design), on the webpage, there is a card at the center of the page with three divisions. The first division contains the profile photo, the name of the person and, the designation. The center portion of the card contains the contact details of the person and, the below card contains some social media icons. The hover effect is used in every button. This Business Card Design is made responsive by using the media query property.

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

Responsive Business Card Design with modern UI [Source Code]

To make this website (Responsive Business Card Design with modern UI), you need to create two files: an HTML file and 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 lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="./style.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"> <title>Business card || Learningrobo</title> </head> <body> <div class="card"> <div class="header"> <img src="https://cdn.pixabay.com/photo/2018/11/13/21/43/instagram-3814049__480.png"> <h3>John Doe</h3> <p>Mobile App Developer</p> </div> <div class="body"> <ul> <li> <h3>5-555-666-777</h3> <p>Mobile number</p> <i class="fas fa-mobile-alt"></i> </li> <li> <h3>example@gmail.com</h3> <p>Email address</p> <i class="fas fa-envelope"></i> </li> <li> <h3>www.example.com</h3> <p>Website address</p> <i class="fas fa-globe-americas"></i> </li> </ul> </div> <div class="footer"> <ul> <li> <i class="fab fa-facebook-f"></i> </li> <li> <i class="fab fa-twitter"></i> </li> <li> <i class="fab fa-instagram"></i> </li> <li> <i class="fab fa-linkedin-in"></i> </li> </ul> </div> </div> <div class="credit">Made with <span style="color:tomato">❤</span> by <a href="https://www.learningrobo.com/">Learning Robo</a></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.


body{
    background: #11998e; 
    background: -webkit-linear-gradient(to right, #38ef7d, #11998e); 
    background: linear-gradient(to right, #38ef7d, #11998e); 
}

.card {
    position: relative;
    height: 460px;
    width: 300px;
    background-color: #fff;
    margin: 100px auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.header {
    position: absolute;
    height: 220px;
    width: 95%;
    margin:0 auto;
    left: 0;
    right: 0;
    top: -30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    background-image: linear-gradient(to right, #1dd1a1, #1abc9c);
}

.header img {
    position: absolute;
    height: 120px;
    width: 120px;
    border-radius: 50%;
    left: 90px;
    top: 22px;
}

.header h3 {
    position: absolute;
    font-family: sans-serif;
    color: white;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
    top: 118px;
    left: 90px;
}

.header p {
    position: absolute;
    font-family: sans-serif;
    color: rgb(236, 233, 233);
    font-size: 13px;
    top: 166px;
    left: 90px
}

.body {
    position: absolute;
    height: 126px;
    left: 5px;
    right: 5px;
    top: 52%;
    border-radius: 12px;
}

.body ul {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    top: 0;
    
}

.body ul li {
    position: absolute;
    list-style: none;
    display: block;
    height: 40px;
    width: 100%;
    left: 0;
    right: 0;
    border-radius: 12px;
    background-color: transparent;
    transition: all .3s ease-in-out;
}

.body ul li p,
h3,
i {
    position: absolute;
}

.body ul li h3 {
    top: -17px;
    left: 58px;
    color: #16a085;
    
}

.body ul li p {
    top: 14px;
    left: 59px;
    font-size: 12px;
    font-family: sans-serif;
    color: #16a085;
}

.body ul li i {
    left: 8px;
    top: 7px;
    color: #16a085;
    font-size: 26px;
}

.body ul li:nth-child(1) {
    top: -16px;
}

.body ul li:nth-child(2) {
    top: 26px;
}

.body ul li:nth-child(3) {
    top: 68px;
}

.body ul li:nth-child(1) i {
    left: 12px;
}

.body li:hover {
    background-color: #16a085;
    cursor: pointer;
}

.body li:hover i{color:#fff}
.body li:hover h3{color:#fff}
.body li:hover p{color:#fff}
/*footer*/

.footer {
    position: absolute;
    height: 80px;
    bottom: -30px;
    left: 0;
    right: 0;
    border-radius: 12px;
    width:95%;
    margin: 0 auto;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    background-image: linear-gradient(to right, #1dd1a1, #1abc9c);
}

.footer ul {
    position: absolute;
    left: -60px;
}

.footer ul li {
    display: inline-block;
    margin-left: 60px;
}

.footer ul li i {
    font-size: 30px;
    color: #000;
    transition: all .3s ease-in;
}

.footer ul li:hover i {
    transform: scale(0.9);
    color: #fff;
    cursor: pointer;
}

.credit a{
    text-decoration: none;
    color: #fff;
    
  }

  .credit{
    text-align: center;
  }
We hope you would like this Responsive Business Card Design with modern UI using HTML & CSS.

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