Skip to content

An NFT Card Component built using HTML and CSS. A Frontend Challenge from Frontend Masters.

Notifications You must be signed in to change notification settings

kwekuduahh/nft-card-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - NFT preview card component solution

This is a solution to the NFT preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

This is a responsive card component built with HTML & CSS.

The challenge

Users should be able to:

  • View the optimal layout depending on their device's screen size
  • See hover states for interactive elements

Screenshot

Links

My process

  1. I gathered the design assets on my Figma board.
  2. Designed the interface on Figma.
  3. Proceeded to initialize a git repo and connect the repo.
  4. I created a working branch to ensure that changes are well tracked and prevent errors from the main branch.
  5. Then, I started writing the code to the working branch.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Clamp

What I learned

I learnt how to make good use of css flexbox and clamp() to make responsive layouts.

To see how you can add code snippets, see below:

<div class="image-overlay">
	<img
		src="images/icon-view.svg"
		alt="icon-view"
	/>
</div>
.image-overlay {
	position: absolute;
	opacity: 0;
	background-color: var(--Cyan);
	width: clamp(304px, 90%, 314px);
	height: clamp(304px, 90%, 314px);
	border-radius: 10px;
	transform: translate(0%, -100%);
	transition: 0.5s ease;
	display: flex;
	justify-content: center;
	align-items: center;
}
const proudOfThisFunc = () => {
	console.log('🎉');
};

Continued development

I will keep exploring creating responsive and reusable code in future projects.

Useful resources

  • MDN Docs - This helped me with css clamp() and the hover effect on the image.

Author

About

An NFT Card Component built using HTML and CSS. A Frontend Challenge from Frontend Masters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published