Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS replacement for text-align in percentage

Sticky speaking here's the question itself: Is there any property in CSS3 that alows to place some elements like <p> or any of <h$> like text-align but in percentage.

For instance HTML code:

<p id="first">Here's first P</p>
<p id="second">Here's second P</p>

and its style:

    <style>
        #first {
        margin-left: 50%;
        }
        #second {
            text-align: center;
        }
    </style>

It doesn't look the same in different width. Is there any property like background-position but for such elements as introduced above?

like image 867
Vadym Avatar asked Dec 19 '22 05:12

Vadym


1 Answers

You can use text-ident to ident your text

Link

like image 167
Raja Khoury Avatar answered Jan 07 '23 05:01

Raja Khoury