Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Align buttons in the td element to right

Tags:

html

css-float

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>
like image 505
BPD1 Avatar asked Dec 19 '15 11:12

BPD1


2 Answers

Use float: right property in CSS

like image 52
Parthipan Subramaniam Avatar answered Sep 30 '22 11:09

Parthipan Subramaniam


First give some width to the table.

Then you can use,

float: right (or) align: right

like image 42
Sravan Avatar answered Sep 30 '22 10:09

Sravan