I'm trying to center the text in the very middle. I use style="text-align: center;
for the x-axis and it works good.
How can I make the text in the middle of the page on both axes instead of just the x axis?
I'm trying to center the text in the very middle. I use style="text-align: center;
for the x-axis and it works good.
How can I make the text in the middle of the page on both axes instead of just the x axis?
You can use flex on your css.
body {
display: flex;
justify-content: center;
height: 100vh; /* this height will match your height screen */
align-items: center;
}
or with inline css on your body
<body style="display: flex; justify-content: center; height: 100vh; align-items: center;"></body>