Jump to content

CSS Flexbox Tutorial


ahr aitch

Recommended Posts

In going through the CSS Flexbox tutorial I encountered the code in the screenshot that I don't understand and can't find an answer for searching online.

It appears that there are 2 .flex-container declarations.  Why are there 2?  Why does the second one (in the attached ss, .flex-container > div { etc) exist.  It puzzles me.  I could find no explanation for having to have a second declaration nor for the "> div" syntax.  Obviously, this declaration defines the container, but why couldn't that have been done in a single declaration? 

Could someone please explain this for me?

W3c Flexbox 1 2023-09-15_17h36_15.png

Edited by ahr aitch
clarity
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...