Created
December 4, 2021 03:27
-
-
Save tswaters/0a12b4a18f37cc7d05ba0d6eb298a035 to your computer and use it in GitHub Desktop.
HOW TO: center text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>How to center text</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<table style="width: 100%; height: 100%; position:absolute;"> | |
<tr> | |
<td valign="middle" align="center"> | |
center me! | |
</td> | |
</tr> | |
</table> | |
</body> | |
</html> |
Author
tswaters
commented
Dec 4, 2021
Actually, you can omit valign="middle"
because it's the default.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment