make the button horizontal <div class="float-right w-custom-20% pt-custom-10px…
- User
make the button horizontal
<button (click)="openModal(1)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-custom-250 h-custom-40 text-base text-center mr-1 mb-1 rounded" type="button" aria-hidden="true" > <i class="material-icons align-top">add</i>Add </button> <button *ngIf="someSelected || selectAll" (click)="deleteSelectedItems(4)" type="button" class="bg-custom-red-del text-base text-custom-white border-none w-custom-250 h-custom-40 hover:bg-custom-red-del focus:bg-custom-red-del mr-1 mb-1 rounded" > <i class="material-icons align-top">delete_forever</i> Delete Selected </button> <button *ngIf="someSelected || selectAll" (click)="bulkEdit(5)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-custom-250 h-custom-40 text-base text-center mr-1 mb-1 rounded" type="button" aria-hidden="true" > <i class="material-icons align-top">add</i>Bulk Edit </button> </div> - Assistant
To make the buttons horizontal, you can add the CSS property
display: inline-blockto the button elements.Here is the modified code with the horizontal buttons:
<button (click)="openModal(1)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-custom-250 h-custom-40 text-base text-center mr-1 mb-1 rounded" type="button" aria-hidden="true" style="display: inline-block;"
<i class="material-icons align-top">add</i>Add<button *ngIf="someSelected || selectAll" (click)="deleteSelectedItems(4)" type="button" class="bg-custom-red-del text-base text-custom-white border-none w-custom-250 h-custom-40 hover:bg-custom-red-del focus:bg-custom-red-del mr-1 mb-1 rounded" style="display: inline-block;"
- User
using tailwind
- Assistant
To make the buttons horizontal using Tailwind CSS, you can add the
flexclass to the container div and adjust the button widths accordingly. Here is the modified code:<div class="float-right w-custom-20% pt-custom-10px pl-custom-96-53px flex"> <button (click)="toggleServer()" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-1/4 h-custom-40 text-base text-center mr-1 mb-1 rounded" type="button" aria-hidden="true" > <i class="material-icons align-top">storage</i> Change Server </button> <button (click)="openModal(1)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-1/4 h-custom-40 text-base text-center mr-1 mb-1 rounded" type="button" aria-hidden="true" > <i class="material-icons align-top">add</i>Add </button> <button *ngIf="someSelected || selectAll" (click)="deleteSelectedItems(4)" type="button" class="bg-custom-red-del text-base text-custom-white border-none w-1/4 h-custom-40 hover:bg-custom-red-del focus:bg-custom-red-del mr-1 mb-1 rounded" > <i class="material-icons align-top">delete_forever</i> Delete Selected </button> <button *ngIf="someSelected || selectAll" (click)="bulkEdit(5)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-1/4 h-custom-40 text-base text-center mr-1 mb-1 rounded" type="button" aria-hidden="true" > <i class="material-icons align-top">add</i>Bulk Edit </button> </div> - User
its horizontal but the size of the button is changing
- Assistant
Apologies for the confusion. To make the buttons horizontal while keeping their size consistent, you can adjust the button widths using the
flex-grow-0class and adjust the container width accordingly. Here is the modified code:<div class="float-right w-custom-20% pt-custom-10px pl-custom-96-53px flex"> <button (click)="toggleServer()" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-1/4 h-custom-40 text-base text-center mx-1 my-1 rounded flex-grow-0" type="button" aria-hidden="true" > <i class="material-icons align-top">storage</i> Change Server </button> <button (click)="openModal(1)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-1/4 h-custom-40 text-base text-center mx-1 my-1 rounded flex-grow-0" type="button" aria-hidden="true" > <i class="material-icons align-top">add</i>Add </button> <button *ngIf="someSelected || selectAll" (click)="deleteSelectedItems(4)" type="button" class="bg-custom-red-del text-base text-custom-white border-none w-1/4 h-custom-40 hover:bg-custom-red-del focus:bg-custom-red-del mx-1 my-1 rounded flex-grow-0" > <i class="material-icons align-top">delete_forever</i> Delete Selected </button> <button *ngIf="someSelected || selectAll" (click)="bulkEdit(5)" class="bg-custom-orange border-custom-orange outline-custom-orange text-transform:capitalize text-custom-white w-1/4 h-custom-40 text-base text-center mx-1 my-1 rounded flex-grow-0" type="button" aria-hidden="true" > <i class="material-icons align-top">add</i>Bulk Edit </button> </div>