Skip to main content

18 posts tagged with "tutorial"

View All Tags

Wait, My Buttons Are Still Side-by-Side Without Flex? Understanding inline-block vs Flexbox

· 13 min read
Mahmut Salman
Software Developer

I removed flex from my button container, expecting them to stack vertically, but they're still sitting side-by-side! 🤨 I thought flex was what made them horizontal. My frontend mentor corrected my misunderstanding: buttons are inline-block by default, which means they naturally sit beside each other. This conversation taught me the crucial difference between "happens to be side-by-side" and "controlled side-by-side layout."

Wait, Why Does My Width Stay 384px But Height Changes? Understanding the CSS Box Model

· 9 min read
Mahmut Salman
Software Developer

I'm a backend developer learning frontend, and I just noticed something weird in Firefox Inspector. I removed p-8 from my div, and the height changed from 124px to 60px—but the width stayed at 384px! 🤔 My frontend mentor explained the CSS Box Model and why w-96 behaves differently from h-auto. This conversation finally made the box model click for me.

Why Adding 'block' to My Label Changed Everything: Understanding CSS Display Property

· 11 min read
Mahmut Salman
Software Developer

I'm learning frontend after years of backend work, and I just discovered something fundamental that nobody explains clearly: the display property. I added block to my label, and suddenly my form inputs stacked vertically instead of sitting side-by-side. I had no idea what I just did. 🤯 My frontend mentor explained how block, inline, and inline-block are the foundation that flexbox and grid are built on. This conversation changed everything.

Why My Password Field Wasn't Spacing Correctly: Understanding Form Structure and space-y

· 13 min read
Mahmut Salman
Software Developer

I'm a backend developer building my first login form, and I couldn't figure out why my password field wasn't spacing away from the email field. Both fields were squished together even though I had space-y-4 on the form! 😤 My frontend mentor showed me a critical structural mistake: I put both fields in the SAME div. This conversation taught me why form structure matters just as much as styling.

The Mystery of CSS Flexbox Centering: Why Merging Two Divs Breaks Everything

· 10 min read
Mahmut Salman
Software Developer

I'm a backend developer learning frontend, and I just spent 2 hours debugging why my centered login form moved to the left when I "simplified" my code. The CSS felt like black magic. 🎩✨ My frontend mentor showed me why two divs are NOT just redundant nesting—they're a fundamental pattern in CSS positioning. Let me share this conversation that changed how I think about layout.

Stop Writing For Loops: Master Java Streams with 5 Essential Patterns

· 14 min read
Mahmut Salman
Software Developer

I used to think Java Streams were confusing magic. I avoided them for months, writing nested for loops like it was 2005. Then I saw a senior developer calculate cart totals in ONE line of code that took me 15 lines. I felt like a caveman discovering fire. 🔥 Let me teach you the 5 patterns that cover 90% of real-world Stream usage—no PhD required.