Align table headings and cells the same

  • 2
  • Question
  • Updated 3 years ago
  • Answered
Is there a way, perhaps with some clever CSS, to ensure that table headings (the TH cells) align the same way as their corresponding detail cells (the TD cells)? 
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb

Posted 4 years ago

  • 2
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Wait, the table should be doing this by default? Do you mean the text with the TH and TD?
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Glenn, can you post a screenshot?
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,738 Points 5k badge 2x thumb
Hmmm, you're right. When I spin up a new page with the Modern theme, the TH headings align with the TD contents correctly. But within our styled version they don't. We don't explicitly style those elements at all, but the finger of blame is certainly pointing in our direction. I'll investigate. Thanks for the pointer, gents.
Photo of Or Cingilli

Or Cingilli

  • 104 Points 100 badge 2x thumb
So, we're having the same issue actually. The TH heading is set to left align and the TD is set to left align, but as you can see in the screenshot the TH is definitely centered. 

Is there a way to fix this issue?