Responsive Profile Card Design using HTML & CSS

Responsive Profile Card Design using HTML & CSS

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


A profile card contains the person’s details like photos, about, some social media icons like Facebook, Twitter, Instagram, and LinkedIn to contact them, and some other information about the person. 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 (Responsive Profile Card Design), there is a card at the center of the page with a person’s profile photo at the top center of the card. The hover effect is used in every icon. There are two buttons below to the social media icons. This Profile Card Design is made responsive by using the media query property.

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

Responsive Profile Card Design [Source Code]

To make this website (Responsive Profile Card Design), 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> <head> <title>Responsive profile card design || Learningrobo</title> <link rel="stylesheet" href="style.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap" rel="stylesheet"> <script src="https://kit.fontawesome.com/c39c442009.js" crossorigin="anonymous"></script> </head> <body> <img src="https://cdn.pixabay.com/photo/2018/11/13/21/43/instagram-3814049__340.png" class="photo"/> <div class="profile"> <div class="about"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p> </div> <div class="social-icons"> <a class="share-btn"> <i class="fab fa-facebook"></i> </a> <a class="share-btn"> <i class="fab fa-instagram"></i> </a> <a class="share-btn"> <i class="fab fa-twitter"></i> </a> <a class="share-btn"> <i class="fab fa-github"></i> </a> <a class="share-btn"> <i class="fab fa-linkedin"></i> </a> </div> <div class="buttons"> <a href="" class="contact">Contact</a> <a href="" class="download">Download</a> </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.


@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

body{
    font-family: Arial;
    background: #9D50BB;  
    background: -webkit-linear-gradient(to right, #6E48AA, #9D50BB);  
    background: linear-gradient(to right, #6E48AA, #9D50BB); 
    color: #fff;
    line-height: 20px;
}

img{
	height: 100px;
	margin-top: 25px;
	position: absolute;
	z-index: 2;
	border: 5px solid #6E48AA;
}

.photo{
	border-radius: 50%;
	margin-left: 47%;
}

.profile{
	display: inline-block;
	border: 2px solid transparent;
	box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
	max-width: 75%;
	height: 300px;
	margin-top: 85px;
	margin-left: 100px;
	border-radius: 20px;
	padding: 70px;
	background: #12192c;
}

.about{
	line-height : 1.6;
}

.social-icons{
	display: flex;
	align-items: center;
	justify-content: space-around;
	margin-top: -130px;
	padding: 180px;
	font-size: 40px;
	flex-direction: row;
	color: #4776E6;
}
.share-btn:hover{ 
	cursor: pointer;
    transition: all ease-in-out 300ms;
    transform: translate(0px, -5px) scale(1);
}

.buttons{
	display: flex;
	align-items: center;
	justify-content: space-around;
	margin-top: -20%;
	padding: 100px;
}

.contact, .download{
	text-decoration: none;
	border: none;
	padding: 7px;
	border-radius: 5px;
	text-align: center;
	width: 100px;
    background: #8E54E9;
    cursor: pointer;
    margin: 10px;
    padding: 15px;
    color: #6E48AA;
    font-weight: 900;
}
@media only screen and (max-width: 1000px){
	.profile{
		margin-left: 50px;
        width:90%;
	}
	.share-btn{
		font-size: 25px;
		display: flex;
		justify-content: space-between;
		padding: 20px;
		margin-top: -45px;
	}
	.buttons{
		margin-top: -250px;
	}
}
We hope you would like this Responsive Profile Card Design using HTML & CSS.

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

Post a Comment

Thank you
Learning robo team

Post a Comment (0)

Previous Post Next Post
Learning Robo says...
code copied
Welcome