/
Other choices for arrangement

Other choices for arrangement

Flex is like grid but more about alignment on either a horizontal or vertical axis. So for some positioning problems it can be a valid alternative to using grid.

Other useful tricks for problems like right aligning a couple of buttons in a div are to do things like setting the parent div to

text-align: right;

That can work very well for some simple problems.

Generally it’s okay in practice to use a few different practices - the main thing is to keep things flat and use prefix name space naming of classes, CSS files and CSS matching rules so it’s easy to find things and change things and know all the places in a website/application that you have to change.

 

Related content

Understand display : inline versus block
Understand display : inline versus block
Read with this
How do we go about overall page layout with a CSS grid?
How do we go about overall page layout with a CSS grid?
More like this
Handling white space - ignoring line breaks in white space
Handling white space - ignoring line breaks in white space
Read with this
How can we find simplicity in CSS?
How can we find simplicity in CSS?
More like this
CSS Layout Concepts
CSS Layout Concepts
Read with this
How do use a CSS grid to layout a form nicely?
How do use a CSS grid to layout a form nicely?
More like this