DEV Community

Shannon Crabill
Shannon Crabill

Posted on

Which CSS concepts do you find confusing?

Top comments (27)

Collapse
 
salyadav profile image
Saloni Yadav

center aligning a content takes a toll on me, everytime!
do i vertical-align, justify-content, align-item, HOLY GOD!!! I sometimes end up doing everything and pray it works! hahaha.

Collapse
 
blindfish3 profile image
Ben Calder

For centring things check out CSS -Tricks. They've also got a good resource for Flexbox; so I guess their Grid guide will be good too :)

Collapse
 
salyadav profile image
Saloni Yadav

Oh yes! CSS-Tricks has been my bible for CSS for long now. Flex box, Grid all of the articles as brilliant (bar so so long). Yet, often my browser refuses to obey my knowledge of Centering. Haha. On a different note, try their animation article. That’s also brilliant!

Thread Thread
 
meg_gutshall profile image
Meg Gutshall

They actually have a guide on centering objects! You're definitely not the only one! Lol! css-tricks.com/centering-css-compl...

Collapse
 
scrabill profile image
Shannon Crabill

Collapse
 
bernardbaker profile image
Bernard Baker

I took a course on flex box. Feel free to pair up with me on a video call and I can run you through it.

Collapse
 
salyadav profile image
Saloni Yadav

Hey Bernard, that would be great!!

Thread Thread
 
bernardbaker profile image
Bernard Baker

Follow me so I can chat with you. And where in the world are you? So we can schedule a video call.

Thread Thread
 
salyadav profile image
Saloni Yadav • Edited

I am in India. So live on IST!

Thread Thread
 
bernardbaker profile image
Bernard Baker

Ok roughly + 4.5 hours.

Collapse
 
madkour17 profile image
Madkour17

sometimes just margin: auto is enough

Collapse
 
tfantina profile image
Travis Fantina • Edited

I always confuse justify-content align-items and align-self with Flexbox.

Collapse
 
salyadav profile image
Saloni Yadav

Join the club!! 😂

Collapse
 
dfockler profile image
Dan Fockler

Just getting around to learning CSS Grid. It's really powerful, but the syntax is also pretty complex.

Collapse
 
scrabill profile image
Shannon Crabill

CSS Grid is on my list to learn. I recently used Flexbox for the first time so CSS Grid sounds like a next thing to try out.

Collapse
 
dfockler profile image
Dan Fockler

Nice! Flexbox is pretty awesome. CSS Grid is very similar (uses the same align/justify rules) but 2D instead of just a single row or column of items.

Thread Thread
 
jrc86 profile image
Jonas

I desperately need to learn CSS Grid :)
I'm even thinking of starting a new project just to learn it, hoping interested people will join :)

Collapse
 
bernardbaker profile image
Bernard Baker

~ confused me. As a selector it selects elements preceded by another. E.g. select all the p tags div ~ p.

<div>
  <p>Foo</p>
  <p>Bar</p>
</div>
Collapse
 
scrabill profile image
Shannon Crabill

Yup, the ~ is one I have to Google how to use too. Selectors are powerful, but not always intuitive.

Collapse
 
bernardbaker profile image
Bernard Baker

Wouldn't it be great if it allowed regular expressions.

Collapse
 
meg_gutshall profile image
Meg Gutshall
Collapse
 
bernardbaker profile image
Bernard Baker

That's handy.

Collapse
 
blindfish3 profile image
Ben Calder

It took me a while to figure out stacking context - that can really mess with your head - but in general I find CSS pretty straightforward these days. Things are much simpler now there are far fewer browser inconsistencies to deal with.

Collapse
 
meg_gutshall profile image
Meg Gutshall • Edited

I've seen flexbox and CSS grid combined... but I'm not at that level yet. Lol!

Also I still have to bring up the inspect tool real quick to look at the graphic at the bottom of the 'Elements' tab to remember which is margin and which is padding. I always get them mixed up!!

Collapse
 
klutchkid profile image
Klutch

Making literally anything centered without a framework haha

Collapse
 
meg_gutshall profile image
Meg Gutshall
Collapse
 
geoffyuen profile image
Geoff Yuen

Why was it decided:

  • to make floats collapse it's container?
  • to make margins not collapse in a flex container?