When working on my projects, I often come across a design challenge. I need to align cell text in the center of the header and then right-align it with the data above and below, all within a bordered table. The cells in the image below are spread across different rows. How can I achieve this?
I attempted to use text-align:center
, but it centered everything. I also tried using padding
, but it didn't produce the desired result. Even text-align: right
did not properly align the data with the header.