HTML CSS examples for CSS Layout:Text
Align text line and place it to the center with 70% of the container width
<html lang="en"> <head> <title>stackoverflow question:answer</title> <style> .container {<!--from w w w . j a v a 2 s .c o m--> text-align:center; } .container::before { content:''; width:31%; display:inline-block; } </style> </head> <body translate="no"> <div class="container"> Text </div> </body> </html>