Modern Responsive Profile Card using HTML & CSS

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

A profile card contains the person’s details like a photo, some description about the person, some social media icons like Facebook, Twitter, Instagram, and LinkedIn to contact them. A profile card is used as an identity of a specific person. By placing the profile card on the web page, the user can contact the person easily.

In this blog (Modern Responsive Profile Card), there is a card at the center of the page with a person’s profile photo at the top center of the card, name, domain, place, and some information like how many posts you have likes you have and the count of the projects that you have done can be mentioned. There are some social media icons like youtube, Github, Linkedin, and Instagram to contact the person, and also there are two buttons below to the social media icons such as follow and contact.

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

Modern Responsive Profile Card [Source Code]

To make this website (Modern Responsive Profile Card), 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"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"> <link rel="stylesheet" href="./style.css"> <title>modern Profile Card || Learningrobo</title> </head> <body> <div class="profile-container"> <div class="img-container"> <img src="https://cdn.pixabay.com/photo/2018/11/13/21/43/instagram-3814049__480.png" alt="profile image"> </div> <p class="info full-name">Learningrobo</p> <p class="info role"> <i class="fas fa-robot"></i><br> Robotics </p> <p class="info place"> <i class="fas fa-map-marker-alt"></i><br> Milan, Italy </p> <div class="posts-info"> <p><span>300+</span> Posts</p> <p><span>5000+</span> Likes</p> <p><span>90+</span> Projects</p> </div> <div class="social-container"> <button class="youtube"> <i class="fab fa-youtube"></i> </button> <button class="github"> <i class="fab fa-github"></i> </button> <button class="linkedin"> <i class="fab fa-linkedin-in"></i> </button> <button class="instagram"> <i class="fab fa-instagram"></i> </button> </div> <button class="action">Follow</button> <button class="action message">Contact</button> <div class="credit">Made with <span style="color:tomato">❤</span> by <br><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 responsive create a CSS file with the name style.css and remember that you have to create a file with a .css extension.


* {
    margin     : 0;
    padding    : 0;
    box-sizing : border-box;
    color      : #334e64;
    font-family: 'Montserrat', sans-serif;
}

body {
    min-height     : 100vh;
    width          : 100%;
    display        : flex;
    justify-content: center;
    align-items    : center;
    background: #11998e;
    margin: 70px;  
background: -webkit-linear-gradient(to right, #38ef7d, #11998e);  
background: linear-gradient(to right, #38ef7d, #11998e); }

.profile-container {
    position        : relative;
    background-color: #fff;
    width           : 350px;
    padding         : 100px 50px 40px;
    border-radius   : 19px;
    box-shadow      : 0 0 60px 5px rgba(0, 0, 0, 0.2);
    display         : flex;
    flex-direction  : column;
    justify-content : center;
    align-items: center;
}

.img-container {
    width        : 130px;
    height       : 130px;
    overflow     : hidden;
    border       : 5px solid #11998e;
    border-radius: 50%;
    box-shadow   : 0 8px 55px #11998e;
    position     : absolute;
    top          : 0;
    left         : 50%;
    transform    : translate(-50%, -50%);
}

.img-container img {
    width    : 100%;
    max-width: 100%;
    transform: scale(1.1);
}

.info {
    margin-bottom: 12px;
    text-align: center;
}

.info i {
    margin-right: 8px;
    font-size   : 1.1em;
}

.place {
    margin-bottom: 40px;
}

.full-name {
    font-size     : 1.4em;
    font-weight   : bold;
    letter-spacing: 1px;
    color         : #11998e;
}

.posts-info {
    width          : 100%;
    display        : flex;
    justify-content: space-around;
    align-items    : center;
    font-size      : 1.1em;
    letter-spacing : 0.5px;
    margin-bottom  : 30px;
    text-align     : center;
    text-align: center;
}

.posts-info span {
    display      : block;
    font-weight  : bold;
    margin-bottom: 4px;
}

.social-container {
    width          : 100%;
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    margin-bottom  : 20px;
}

.social-container i {
    color: #fff;
}

.social-container button {
    border: none;
    outline         : none;
    width           : 45px;
    height          : 45px;
    border-radius   : 50%;
    font-size       : 1.2em;
    cursor          : pointer;
    box-shadow      : 0px 5px 25px rgba(0, 0, 0, 0.15);
    transition      : transform 0.3s;
}

.social-container button:hover {
    transform: scale(1.1);
}

/* Social colors */

.social-container button.youtube {
    background: linear-gradient(45deg, #ff000088, #ff0000);
}

.social-container button.linkedin {
    background: linear-gradient(45deg, #0e76a888, #0e76a8);
}

.social-container button.instagram {
    background: linear-gradient(45deg, #e6683ccc 25%, #dc2743 50%,
            #bc1888 100%);
}

.social-container button.github {
    background: linear-gradient(45deg, #33333388, #333333);
}

.action {
    outline: none;
    cursor: pointer;
    color: #fff;
    background-color: #11998e;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    width: 80%;
    margin-top: 25px;
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.action.message {
    background-color: #202124;
}

.action:hover {
    transform: scale(1.05);
    opacity: 0.85;
}

.credit a{
    text-decoration: none;
    color: #11998e;
  }
  
  .credit {
      margin-top: 10px;
      text-align: center;
  }
We hope you would like this Modern Responsive Profile Card using HTML & CSS.

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