You need to sign in to do that
Don't have an account?
Akhil Katkam 5
Issue with the Table Data Alignment
Hi Developer Community,
We want to Display text from a single record of an object, These are stored in fields (type:text area)
There is an issue with a table alignment for one of my component.
as u can see that left side field datas , those are not inclined exactly to right side data , i need to have left and right data to be aligned in same way , left side data points to right side data
here is the code:
please help me the suggestions , so that data can be aligned in the correct manner according to left side fields
Thanks in Advance
We want to Display text from a single record of an object, These are stored in fields (type:text area)
There is an issue with a table alignment for one of my component.
I will be sharing the screenshot of the issue here:
as u can see that left side field datas , those are not inclined exactly to right side data , i need to have left and right data to be aligned in same way , left side data points to right side data
here is the code:
<table class="slds-table slds-table_cell-buffer slds-table_bordered slds-no-row-hover slds-table_col-bordered"> <tbody> <aura:iteration items="{!v.Competition}" var="comp"> <tr scope="row" class="slds-box"> <td style="vertical-align:top;">Coverage<br/><br/>Compatibility<br/><br/>Capability<br/><br/>Creditworthiness<br/><br/>Capacity<br/><br/>Commitment</td> <td class="slds-cell-wrap">{!comp.ciboostc1501__Coverage__c}<br/><br/>{!comp.ciboostc1501__Compatibility__c}<br/><br/>{!comp.ciboostc1501__Capability__c}<br/><br/>{!comp.ciboostc1501__Creditworthiness__c}<br/><br/>{!comp.ciboostc1501__Capacity__c}<br/><br/>{!comp.ciboostc1501__Commitment__c}</td> </tr> </aura:iteration> </tbody> </table>
please help me the suggestions , so that data can be aligned in the correct manner according to left side fields
Thanks in Advance
For use cases like this SLDS provides Name => Value pairs, see this doc (https://www.lightningdesignsystem.com/utilities/name-value-list/#content) for help.
With just one class (slds-list_horizontal), you can change the layout as needed, so they can be stacked.
Your markup would look like this:
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.
You can try the below:
HTML:
CSS:
Thanks,
Maharajan.C