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.

Â