Skip to content Skip to sidebar Skip to footer

Html Table Alignment Right

-------------------------------- | item a item b | | item c item d item e | --------------------------------- | item a item b | | item c

Solution 1:

You had some incorrect syntax. You were using style="align-right" when I believe you meant style="text-align:right;". You also need to add a colspan="2" to the <td> which needs to span 2 columns - aka the "item b" cell:

<tablewidth="500px"><tr><td>
            item a
        </td><tdstyle="text-align:right;"colspan="2">
            item b
        </td></tr><tr><td>
            item c
        </td><tdstyle="text-align:right;">
            item d
        </td><tdstyle="text-align:right;">
            item e
        </td></tr></table>

http://jsfiddle.net/A5LDZ/2/

Post a Comment for "Html Table Alignment Right"