CSS3 > Texts

Text-align-last Property in CSS3

How to align the last line of the content in CSS3?


By using text-align-last property we can align the last line of a text.

<style>
        p {
            -moz-text-align-last: end; /*For Mozilla Firefox*/
            text-align-last: end;
            text-align: justify;
        }
</style>

<body>
    <h3>SN ITFunda Service LLP </h3>
    <p>We are a group of professionals having more than 10 years of real time working experience in Microsoft
       .NET technology.Our founder is Mr. SheoNarayan who has been awarded with several awards like Start 
        Entrepreneur Award, Microsoft MVP Award etc. He is also the founder of a very popular .NET Technology
        knowledge based community website www.DotNetFunda.com and several other websites primarily to share
        information and exchange knowledge like www.FundooVideo.com and www.FarmingFunda.com.</p>

    <strong>Note: It works only in IE and Firefox.</strong>
</body>

In the above code snippet we have given text-align-last property to the <p> element. The last line of a <p> element text will be at the end (right side) of the webpage, this is due to the "text-align-last:end"

OUTPUT

 Views: 3504 | Post Order: 81



Write for us






Hosting Recommendations