single price card

Quick Introduction

Yesterday, I wanted to do a design challenge and I was looking for it. Then I reached frontendmentor.io and there I saw a single price card design which was looking awesome. So I tried to replicate it and here’s what I came up with.

If you are interested in design challenges visit: frontendmentor.io

Here’s what we are making:

Clean Single Price Card Design: Using Flexbox 1 » Csspoint101

HTML

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<link
			rel="icon"
			type="image/png"
			sizes="32x32"
			href="./images/favicon-32x32.png"
		/>

		<title>Frontend Mentor Challenge</title>

		<link rel="stylesheet" href="./style.css" />
	</head>
	<body>
		<main>
			<section>
				<h1>
					Join our community
				</h1>

				<h2 class="yellow">
					30-day, hassle-free money back guarantee
				</h2>
				<p class="light-black">
					Gain access to our full library of tutorials along with expert code
					reviews.
				</p>
				<p class="light-black">
					Perfect for any developers who are serious about honing their skills.
				</p>
			</section>

			<div class="row">
				<section class="cyan">
					<h2>
						Monthly Subscription
					</h2>

					<p class="faded">
						<span class="big">&dollar;29</span>
						per month
					</p>

					<p>
						Full access for less than &dollar;1 a day
					</p>

					<button>
						Sign Up
					</button>
				</section>

				<section class="greyish-blue">
					<h2>
						Why Us
					</h2>

					<ul>
						<li>Tutorials by industry experts</li>
						<li>Peer &amp; expert code review</li>
						<li>Coding exercises</li>
						<li>Access to our GitHub repos</li>
						<li>Community forum</li>
						<li>Flashcard decks</li>
						<li>New videos every week</li>
					</ul>
				</section>
			</div>
		</main>
	</body>
</html>

CSS

@import url('https://fonts.googleapis.com/css?family=Karla:400,700&display=swap');

* {
	box-sizing: border-box;
}

body {
	background-color: hsl(204, 43%, 93%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Karla', sans-serif;
	padding: 20px;
	margin: 0;
	min-height: 100vh;
}

main {
	background-color: #fff;
	border-radius: 10px;
	box-shadow: 0 5px 10px 10px rgba(0, 0, 0, 0.05);
	max-width: 800px;
	margin: auto;
	overflow: hidden;
	width: 800px;
}

section {
	padding: 35px;
}

.greyish-blue {
	background-color: hsl(179, 47%, 52%);
	color: #fff;
}

.cyan {
	background-color: hsl(179, 62%, 43%);
	color: #fff;
}

.row {
	display: flex;
}

.row > section {
	flex: 1;
}

h1 {
	color: hsl(179, 62%, 43%);
	font-size: 34px;
}

.yellow {
	color: hsl(71, 73%, 54%);
}

p {
	font-size: 18px;
}

p.light-black {
	color: #999;
	margin: 7px;
}

p.faded {
	color: hsl(179, 43%, 75%);
	display: flex;
	align-items: center;
}

p.faded span {
	color: #fff;
	font-size: 50px;
	margin-right: 10px;
}

button {
	background-color: hsl(71, 73%, 54%);
	border-radius: 5px;
	border: none;
	box-shadow: 0 5px 10px 10px rgba(0, 0, 0, 0.05);
	color: #fff;
	font-family: 'Karla', sans-serif;
	font-size: 18px;
	font-weight: 700;
	padding: 20px 0;
	margin-top: 15px;
	width: 100%;
}

ul {
	list-style-type: none;
	padding: 0;
	opacity: 0.7;
}

ul li {
	line-height: 28px;
}

@media screen and (max-width: 600px) {
	.row {
		flex-direction: column;
	}
}

Thanks for reading my article on single price card design. If you liked this post do share with your friends and also check out other posts on : javascript password generator or

4 Best Ways to Host website for Free (Static) : (Lifetime) or Best chrome extensions for developers

Default image
JatinRaj
Hello, My name is Jatin Raj and I am a web developer from India. I love to code every single day and share my thoughts with you people. Hobbies include reading books, football, and sketching/Painting.