www.webdeveloper.com
Results 1 to 2 of 2

Thread: HTML table text-align

  1. #1
    Join Date
    Dec 2007
    Posts
    95

    HTML table text-align

    Is it possible to align a single line of text within a cell to the right, while the rest of the text remains to the left?

    HTML or CSS?

  2. #2
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    190
    yup, using the CSS attribute 'float'.
    put the stuff u want right aligned into a span and put it before the rest of the stuff in the table cell.

    Code:
    <table>
     <tr>
      <td><span style="float:right">Floating Text</span>Other Text</td>
     </tr>
    </table>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles