0
HTML Alignment
I know that you can move text to the center of an HTML document with the text-align: center; property in CSS, but I do not know how to align other items like tables or buttons to the center. Could you maybe show me how to align the other items to the center? Thank you for your help.
2 Respuestas
+ 3
Aligning containers, block-level elements can get quite tricky.
Ultimately it comes down to the layout of the page, and most commonly this would be handled by CSS tools such as Grid or Flexbox.
https://elementor.com/blog/center-a-div/
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
+ 1
yes, as Tibor Santa said, using containers like grid or flexbox is the better method.
Instead of positioning the DOM elements individually, put them in containers that positions them for you.