Welcome to our blog Contact Us Subscribe!

Responsive Profile Card with HTML and CSS

In this blog post, I have shared the source code of the Responsive Profile Card with HTML and CSS. Also provided the GitHub repository below.

Responsive Profile Card with HTML and CSS

In this blog post, I have shared the source code of the Responsive Profile Card with HTML and CSS. Also provided the GitHub repository below.
Responsive Profile Card with HTML and CSS
index.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
    <title>Profile Card</title>
</head>

<body>
    <section>
        <div class="head">
            <div class="image_container">
                <img src="image.jpg" alt="">
            </div>
        </div>
        <div class="content">
            <h2>Yama Buddha</h2>
            <h4>Rapper</h4>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nihil corporis, aliquid nemo labore quibusdam
                dicta neque incidunt quod vero quas, magni optio, nisi deserunt mollitia.</p>
            <hr>
            <div class="social_icons">
                <a href="#"><i class="bi bi-facebook"></i></a>
                <a href="#"><i class="bi bi-instagram"></i></a>
                <a href="#"><i class="bi bi-github"></i></a>
            </div>
        </div>
    </section>

</body>

</html>

style.css

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
}

body {
  height: 100vh;
  width: 100vw;
  background-color: aquamarine;
  display: flex;
  align-items: center;
  justify-content: center;
}

section {
  width: 375px;
  height: auto;
  background-color: white;
  box-shadow: 5px 5px 25px black;
}

section .head {
  border-bottom-right-radius: 50%;
  overflow: hidden;
}

section .head img {
  width: 100%;
  height: auto;
}

section .content {
  padding: 1rem;
}

section .content h2 {
  font-size: 1.8rem;
}

section .content h4 {
  color: crimson;
  font-size: 1.2rem;
  margin: 0.4rem 0;
}

section .content p {
  text-align: justify;
  font-size: 1rem;
}

a {
  text-decoration: none;
  color: black;
}

.social_icons {
  margin-top: 1rem;
  font-size: 1.3rem;
}

hr {
  margin-top: 1rem;
}

About the Author

Hi! I am Sailesh Rijal, A Fronted Web Developer at AliveCoder. If you ask me for my short introduction then I would love to tell my self as a noob web designer who wants to learn and grow everyday.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.