Skip to content
loading...

re: Do you still use "position" to center align vertically and horizontally? VIEW POST

FULL DISCUSSION
 

It depends on

  • How many items horizontally need to be aligned
  • If i want the content to center while ignoring other elements in the container
  • If I want the content to take the container width into account.
  • If I expect the number of elements to change.
  • If I want the padding to be factored into the alignment of the items.
 

Nice scenarios! Can you also specify solution method you use in each case? That would be great to know.

code of conduct - report abuse