I'm looking for some guidance on using CSS effectively. I often generate websites using AI and then try coding them myself by comparing them with the generated code. I understand most CSS functions, but I'm having a tough time deciding which properties to apply, especially for things like cards and containers. While I can style basic elements like headers and paragraphs, I get stuck on specifics like font sizes and padding in the AI-generated designs. I know it's not about memorizing everything, but how do I learn when to use properties like 'display: flex' versus 'display: grid'? I really hope some of you can help shed some light on this struggle!
5 Answers
For a straightforward start, check out W3Schools—they have loads of beginner-friendly tutorials. And don't forget about Chrome DevTools; they are essential for experimenting with styles in real-time!
I’ve been in web development for quite some time, and while there’s no one-size-fits-all answer, don’t hesitate to push yourself away from AI-generated stuff. Instead, explore CSS frameworks like Bootstrap or Tailwind to work with established patterns, which also helps you learn better!
Honestly, I'd recommend diving into some solid CSS courses first. Understanding the fundamentals will really help! You can use devtools in your browser to check out the styles applied to various elements. It's super helpful to play around there and see what happens when you change properties. Don't forget to reference MDN for a deeper understanding—it's a great resource!
I believe AI can be a tool, but it shouldn't replace the learning process. Try entering your post into an AI and see if it can create a personalized learning path for you. Also, The Odin Project is fantastic! Just don't rush through it; take your time to grasp the concepts well!
How's the Odin Project going for you? Gotten into any JavaScript yet? That's a big leap!
Try rebuilding common components from scratch without the AI. Focus on things like cards or navigation bars. It helps reinforce what you learn. Also, remember: use flexbox for layouts in one dimension (either rows or columns) and grid when you need a two-dimensional layout. Continuous practice is key!

Real human interaction helps a ton, too! Totally understand the need for personal input while learning.