You need to sign in to do that
Don't have an account?
SazEast
apex:datatable columns not aligned
I have an apex:data table using width attributes but the alignment of the columns is not straight, for example:
I have text-align but how can I align / fix the columns?
Thanks
I have text-align but how can I align / fix the columns?
Thanks
Please have a look:
Use CSS in VF page
<style>
tbody{text-align:center}
</style>
for only a single table
provide any class to the table
<style>
.tableClass tbody{text-align:center}
</style>
<apex:dataTable styleClass="tableClass">
<apex:dataTable>
And Please go through the given link for giving more Style to your dataTable According to your need:
- http://sfdcsrini.blogspot.com/2014/06/how-to-use-apexdatatable-in-visualforce.html
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
All Answers
You should try below code: I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Please have a look:
Use CSS in VF page
<style>
tbody{text-align:center}
</style>
for only a single table
provide any class to the table
<style>
.tableClass tbody{text-align:center}
</style>
<apex:dataTable styleClass="tableClass">
<apex:dataTable>
And Please go through the given link for giving more Style to your dataTable According to your need:
- http://sfdcsrini.blogspot.com/2014/06/how-to-use-apexdatatable-in-visualforce.html
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha