Design comparison
Solution retrospective
I am proud of how I handled my problems, even when it felt like quitting was the easiest choice. I admire my resilience. In my next project, I will always comment on each step in my code. I plan to write a book, and I think commenting will be helpful in that process.
What challenges did you encounter, and how did you overcome them?At first, GitHub was stressful and took a while to understand. Working with CSS was challenging but not overwhelming.
What specific areas of your project would you like help with?I need a simpler way to center my div in CSS. The current method is too bulky. A streamlined version would be nice. My CSS is all over the place. I need a clearer and more organized approach to managing this project's stylesheet.
Community feedback
- @MikDra1Posted 3 months ago
If this comment was useful please mark it as helpful 💗
1. Use CSS Variables for Repeated Values:
Define common values like colors, font sizes, and padding as variables. This reduces redundancy and makes global changes easier.
CSS
:root { --font-primary: 'Outfit', sans-serif; --font-secondary: 'Young Serif', sans-serif; --color-primary: hsl(14, 45%, 36%); --color-secondary: hsl(30, 10%, 34%); --padding: 2rem; --border-radius: 1rem; }
2. Group Related Styles:
Combine related styles to avoid scattering your CSS.
CSS
body, h1, p, ul, li, img { margin: 0; padding: 0; font-family: var(--font-primary); }
3. Use Utility Classes:
Create utility classes for commonly used styles like centering, padding, and text alignment.
CSS
.text-center { text-align: center; } .flex-center { display: flex; justify-content: center; align-items: center; } .padding-lg { padding: var(--padding); }
Marked as helpful0 - @MikDra1Posted 3 months ago
The easiest way for me to center things is to use this three properties on the container in witch we wrap the whole card.
display: grid; place-items: center; min-height: 100vh;
If this comment was useful please mark it as helpful 💗
Good job and keep going 😁😊😉
1@MikDra1Posted 3 months ago@TechTulipz
If you appreciate you can mark my solution as helpful 💗💗💗
0
Please log in to post a comment
Log in with GitHubJoin 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