lundi 13 juin 2016

how to align text center and right

I am facing problem while aligning two text, one in center and other text in right.

I used a Div to align it:

<div style="text-align:center">
  <h1> Sample Heading</h1>

    <div style="float:right; text-align:center">

         <a href="#">sample link</a> 

    </div>
</div>

When I used this my heading comes left, its not a centrally align properly please tell is this the correct way or is there any other way to handle this scenario.

Thanks

Aucun commentaire:

Enregistrer un commentaire