This is a solution to the Blog preview card challenge on Frontend Mentor.
Users should be able to:
- See hover and focus states for all interactive elements on the page
- Solution URL: Github link
- Live Site URL: Blog preview card
- Semantic HTML5 markup
- CSS custom properties
I learned how to use custom font files
@font-face {
font-family: 'Figtree';
src: url("./assets/fonts/Figtree-VariableFont_wght.ttf") format('truetype');
}
I learned how to add border & box shadow
.box {
border: 1px solid hsl(0, 0%, 7%);
box-shadow: 8px 8px;
}
I learned how to makwe the div width same as h1
.box {
display: block;
width: fit-content;
}
p {
width: 0;
min-width: 100%;
}
I learned that setting min-height
is important to align items vertically
body {
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
min-height: 90vh;
}
I still need to practice the positioning an element more. I also need to learn about CSS in general & HTML5 rules.
- W3 School - Best resource to refer for any CSS related queries
- MDN Mozilla - Also a good site to refer for CSS
- Frontend Mentor - @snigdha-sukun