Hello developers, today in this blog you'll learn to create a Simple and Responsive Profile Card using HTML & CSS.
A profile card contains the detail of the person like the photo, description of the person, some social media icons like Facebook, Twitter, Instagram, and LinkedIn to contact them, and some other information about the person. An identity of a specific person can be made with the help of the profile card of the person. By placing the profile card on the web page, the user can contact the person easily.
In this blog (Simple and Responsive Profile Card), there is a card at the center of the page with transparent background color and with CSS box-shadow property which contains the brief description of the person with a person’s profile photo at the top center of the description box. There is a box which contains information about the person. There are some social media icons like Facebook, Instagram, Twitter, Github, and Linkedin which were below the about box. There are also two buttons named Contact and Download which are used to contact the person and download the files that are attached. This Profile Card is made responsive by using the media query property.
The source code of this Simple and Responsive Profile Card is given below, if you want the source code of this program, you can copy it. You can use this Simple and Responsive Profile Card code with your creativity and can take this profile card to the next level.
Simple and Responsive Profile Card using HTML & CSS [Source Code]
To make this website (Simple and 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.
@import url('https://fonts.googleapis.com/css2?family=Josefin+Slab:wght@100&display=swap');
*{
box-sizing:border-box;
font-family: arial;
}
body{
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
height: 100vh;
background-color: #5eb2c7;
}
.container{
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #000;
min-height: 350px;
margin: 0;
max-width: 1000px;
padding: 60px;
border-radius: 20px;
background-color: #88c6d6;
border: none;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
img{
height: 100px;
border: 5px solid #072f5f;
border-radius: 50px;
}
.photo{
margin-top: -70px;
display: flex;
width: 100%;
justify-content: center;
}
.desc{
border: 2px solid #000;
border: none;
width: 35%;
border-radius: 20px;
padding: 25px;
float: left;
text-align: justify;
text-justify: inter-word;
background-color: #bcdee7;
}
.about{
border: 2px solid #000;
border: none;
width: 60%;
border-radius: 20px;
padding: 25px;
float: right;
text-align: justify;
text-justify: inter-word;
background-color: #bcdee7;
}
.right {
display: block;
}
.social-icons{
display: inline-flex;
justify-content: space-around;
align-content: space-between;
width: 60%;
float: right;
padding: 50px;
}
.share-btn {
cursor: pointer;
font-size: 30px;
color: #072f5f;
}
.buttons{
display: inline-flex;
justify-content: space-around;
align-content: space-between;
width: 60%;
float: right;
padding: 20px;
}
.contact, .download{
text-decoration: none;
border: 1px solid #000;
text-align: center;
border-radius: 5px;
width: 150px;
cursor: pointer;
padding: 15px;
font-weight: 900;
background-color: #072f5f;
color: #bcdee7;
cursor: pointer;
border: none;
}
@media(max-width: 850px){
.desc{
width: 100%;
margin-bottom: 35px;
}
.about, .social-icons, .buttons{
width: 100%;
}
}
.credit{
text-align: center;
color: #fff;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
width: 100%;
}
.credit a{
text-decoration: none;
color: #072f5f;
font-weight: bold;
}
Thank you for reading our blog. If you face any problem in creating this Simple and 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