Magento Expert Forum - Improve your Magento experience

Results 1 to 5 of 5

How to align text on html

  1. #1

  2. #2
    Junior Member
    Join Date
    Feb 2018
    Posts
    103
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    To set text alignment in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property text-align for the center, left and right alignment.

    Corporate Gifts Suppliers in Delhi | Corporate Gifts Suppliers in Noida | Corporate Gifts Suppliers in Gurgaon
    Last edited by trzy; 21-02-2020 at 11:33 AM.

  3. #3
    Junior Member kajal's Avatar
    Join Date
    Sep 2014
    Location
    Bangalore
    Posts
    1,446
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Default

    Hi Friends,
    With CSS, if you're doing it properly.

    Assume you have markup for an HTML table like this:

    <table>
    <tr>
    <td>Foo</td>
    <td>Bar</td>
    </tr>
    </table>

    You can align all text in the table with a CSS style targeting the entire table:

    table {
    text-align: center;
    }

    This is considered proper because we're using CSS to change the presentation of the content.

  4. #4
    New member
    Join Date
    Jun 2019
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the informative data.

  5. #5
    Junior Member
    Join Date
    Sep 2016
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can use code text:align for aligning text.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •