BPD1
BPD1

Reputation: 137

Align buttons in the td element to right

have the following html structure. I want to display the buttons in the td elements aligned to right. Tried float:right in the css. But no change. please let me know where i am making mistake. Thanks in advance

<div id="saveResetDiv" class ="saveReset" style="display: none;">
     <table id ="tableSaveReset">
     <tbody>
     <tr id ="buttonSaveReset" class= "buttonSaveReset">
     <td class= "save"  align= "right" ><button id="saveButton" class="save" bgcolor="#FF0000" >Save</button></td>
     <td class= "reset" align= "right"><button id="resetButton" bgcolor="#FF0000">Reset</button></td>
     </tbody>

     </table>
      </div>

Upvotes: 13

Views: 24846

Answers (3)

raphid 32
raphid 32

Reputation: 1

You can only put the 2 of the buttons to align left or right

Upvotes: -1

Parthipan Subramaniam
Parthipan Subramaniam

Reputation: 372

Use float: right property in CSS

Upvotes: 20

Sravan
Sravan

Reputation: 18657

First give some width to the table.

Then you can use,

float: right (or) align: right

Upvotes: 1

Related Questions