I have the following code :
<td>
<button class="btn btn-primary btn-xs" ng-click="r.changeView('requests/edit/' + request.id)">
<i class="fa fa-pencil-square-o"></i>
</button>
<button class="btn btn-primary btn-xs" ng-click="r.changeView('requests/edit/' + request.id)">
<i class="fa fa-step-backward"></i>
<i class="fa fa-step-forward"></i>
</button>
</td>
They appear on 2 different lines.
How can I make them appear next to each other on the same line ?
I tried a few things with float
and display
but without success.
If you're using Bootstrap, try using classes like "pull-left". This will float both of the buttons left and bring them inline. Also check to be sure nothing is overriding the current display attribute.
Did you tried
display: inline-block;
? However that seems unnecessary because two buttons in the same table cell will appear on the same line.Please see how to use
<table>
tag inside in<td>
and get all button in line.If I add that code in a snippet the buttons are next to each other, so it's hard to reproduce:
The buttons are already displayed as
inline-block
. Maybe the table isn't wide enough; if so, You could try<td style='white-space: nowrap'>
.What you need is just css display inline code, which can be use to format your button
form { display: inline; }
this displays an element as an inline element like span