There is such a style:

.help { font-size: 120%; font-family: Verdana, Arial, Helvetica, sans-serif; width: 100%; height: 50px; background-color: #00FF00; } span { margin-top:15px; } body { font-family: Arial, Helvetica, sans-serif; margin: 0px; } 
 <div class="help" > <span style="text-align: center;">О приложении</span> </div> 

The text stubbornly climbs the top, does not work, neither margin-top , nor text-align . And the text "About the app" sticks to the top.

How to indent the top and left?

  • Or maybe you just need to vertically center the text? For this there are other techniques. - Vadim Ovchinnikov

1 answer 1

<span> is a string element. In order to have an indentation from above or below, you must set it to display: block or inline-block .

 .help { font-size: 120%; font-family: Verdana, Arial, Helvetica, sans-serif; color: #333366; width: 100%; height: 50px; background-color: #00FF00; } span { display: inline-block; margin-top:15px; } body { font-family: Arial, Helvetica, sans-serif; margin: 0px; } 
 <div class="help" > <span style="text-align: center;">О приложении</span> </div> 

  • Works, thank you - J Mas