@rngueco
Posted
Hey Aman!
To be able to center your card element vertically and horizontally, you might want to use CSS Flexbox. This would be a better approach than hardcoding a padding/margin value to make your element appear centered on your screen, but on other screen sizes it might not be centered at all.
Also, I noticed that you are repeating a lot of your CSS. For example, all three of your buttons have three different classes applied to each. You can instead apply one class to all buttons (let's call this class btn
) and then just add all common styles to this class. Like so:
.btn {
/* Put all common properties here. */
}
That way you don't have to repeat all the same properties for three different classes 🙂 This was a good first attempt!
Marked as helpful