+ 1
How to align any text to center
How to align any text to center
3 ответов
+ 9
You can do this by using center tag,using inline style and using css . It can be done using any of them it depends upon you.
+ 1
<center>
put your text here
</center>
0
<center> element is deprecated/obsolete in html5... you must use a block container and apply to it the css rule "text-align:center;" for horizontal centering... of the container width (be aware that block elements got the max width available if their container as default behaviour, and you must turn it to css rule "display:inline-block" to be able to constrain it to custom width...)
For vertical centering it will be a few more tricky, but modern browsers provide useful ways to do so (until you need to support older browsers, with wich you must rely on oldest technics harder to implement (needs more workaround to reach the goal, but not impossible)