I'd probably say that flexbox might be easier in a lot of ways. Floats do some very weird things when you're working with multiple floated items, resulting in the hacks of old for "clearing" them, etc.
With Flexbox though, something like this can be done with very minimal CSS:
Fewer styles on the <nav> element as there's now no need to specify dimensions, one more style on the <ul> to set it to display using flexbox, but no need for any styles on the <li> elements at all. Then finally, set the links to display: inline-block so that they behave as inline elements for document flow purposes but in a way that lets us specify some dimensions on them (which isn't possible for regular inline elements.)
I'd probably say that flexbox might be easier in a lot of ways. Floats do some very weird things when you're working with multiple floated items, resulting in the hacks of old for "clearing" them, etc.
With Flexbox though, something like this can be done with very minimal CSS:
Fewer styles on the
<nav>
element as there's now no need to specify dimensions, one more style on the<ul>
to set it to display using flexbox, but no need for any styles on the<li>
elements at all. Then finally, set the links todisplay: inline-block
so that they behave as inline elements for document flow purposes but in a way that lets us specify some dimensions on them (which isn't possible for regularinline
elements.)Thanks and will look into it