I am working on dashboard screen. I have a lightning card which where I want a button on right side inside a footer.
Below is the code I am using.
But When I am trying to align the button inside footer to right using either slds-float_right or even CSS, it is breaking and going outside of card.
<lightning-card>
<div slot="title" class="cardHeading">New</div>
<div class="slds-border_top"></div>
<div class="slds-text-align_center">
<span class="countText">
100
</span>
</div>
<div class="slds-align_absolute-center">
Based on current Fiscal Month
</div>
<div slot="footer">
<button title="View" data-id='test' onclick={handlenavigation} class="slds-card__footer-action viewButton slds-button slds-button_neutral">View</button>
</div>
</lightning-card>
Can we achieve this anyhow?
Best Answer