1
I need help sorting the buttons I’m generating with angular. I am using "ng-repeat" and is generating the 8 buttons correctly but they are getting out of order I need. Follow the code and output image:
<style>
.divpai {
margin: 0 auto;
width: 50%;
border: 3px solid;
border-color: darkblue;
position: relative;
}
.tclass {
position: absolute;
bottom: 0;
}
.tclass td {
width: 513px;
padding: 5px;
}
.btf {
color: white;
font-weight: bold;
font-size: 20px;
}
</style>
<div class="page-header" id="principal" ng-controller="HomeCtrl">
<div class="divpai" style="width:950px; height: 734px; background-color:#F3E10A" align="center">
<table class="tclass">
<tr ng-repeat="menus in menu" style="text-align: right;">
<td style="text-align: left;" ng-if="4>=($index+1)"><button id="btf1" class="btf" style="width:416px; height: 79px; background-color:#2E5491">{{menus.nome}}</button></td>
<td style="text-align: right; " ng-if="($index+1)>=5"><button id="btf5" class="btf" style="width:416px; height: 79px; background-color:#2E5491">{{menus.nome}}</button></td>
</tr>
</table>
</div>
</div>
I want you to present the 1-4 buttons in the lower left corner, and the 5-8 buttons in the lower right corner. Does anyone have any idea how to fix ? I thank you for any and all help.
In the class use [float;right] as css property as well.
– Bruno
Which class ? in the second TD ?
– Wesley Brito
Apply to the classes of elements you want to be on the right. Be careful not to apply to the ". btf" that will apply to all ...
– Bruno