lundi 20 avril 2015

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 oh <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?

Aucun commentaire:

Enregistrer un commentaire