flexbox, custom variables, pseudo-elements, pseudo-classes

Please log in to post a comment
Log in with GitHubCommunity feedback
- P@kaamiik
First I strongly suggest get feedback on every challenge and refactor your code before you start a new challenge.
HTML Structure
- For decorative and avatar images, use empty alt text:
alt=""
- For the avatar image use the
img
tag in html. You don't need to usebackground
on CSS. header
is for repeatable contents like nav items and page logo on the top of your website that repeats in every page. You need to usep
here.- Your
h1
is ana
tag too. So inside theh1
wrap the text inide ana
tag too. You don't needtabindex
attribute here.
CSS Best Practices
- Start with a proper CSS reset (Andy Bell or Josh Comeau resets are recommended)
- Use viewport height properly: This ensures content can expand beyond viewport height
- Avoid fixed widths:
- Remove
width: 350px
from.card
- Use
max-width
for better text container adaptability
- Remove
- Use relative units:
rem
forfont-size
andmax-width
instead ofpx
- Learn more about this here
- For decorative and avatar images, use empty alt text:
- @Moirand
-
I don't think put the avatar image in p::before is a best practice, but that's a pretty creative way.
-
Add these lines, so you don't have to define
margin-bottom: 0px;
in each element. Read aboutbox-sizing: border-box;
in this site. Also, these lines are common used in most of projects, so I recommend you to always add them.
*, *::after, *::before { padding: 0px; margin: 0px; box-sizing: border-box; }
Awesome👍
-
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord