Title: Colspan text align
Last modified: August 16, 2021

---

# Colspan text align

 *  Resolved [satheeshrajv](https://wordpress.org/support/users/satheeshrajv/)
 * (@satheeshrajv)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/colspan-text-align/)
 * Hi,
    I want to do colspan for specific row(this achieved) and align the text 
   in that specific row to centre and at the same time I want to add ackground color
   to that row alone like in table header. Please help me to achive this.
 * Regards,
    Satheeshraj V
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcolspan-text-align%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [satheeshrajv](https://wordpress.org/support/users/satheeshrajv/)
 * (@satheeshrajv)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/colspan-text-align/#post-14773244)
 * I’m having many tables like this and colspan row number will be vary for each
   table so the css needs to be global(not for specific table). One comman thing
   is all the table will have only 2 columns.
 * I tried the below css:
    td[colspan=”2″] { text-align: center; font-weight: bold;
   background-color: #d9edf7; }
 * background-color is not changing with this. So I kindly request you to help me
   on this.
 * Regards,
    Satheesh
    -  This reply was modified 4 years, 7 months ago by [satheeshrajv](https://wordpress.org/support/users/satheeshrajv/).
 *  Thread Starter [satheeshrajv](https://wordpress.org/support/users/satheeshrajv/)
 * (@satheeshrajv)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/colspan-text-align/#post-14773292)
 * I have achieved with the below css. Please correct me if I’m wrong.
 * .tablepress tbody tr td[colspan=”2″] {
    text-align: center; font-weight: bold;
   background-color: #d9edf7; }
 * Regards,
    Satheeshraj
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/colspan-text-align/#post-14775084)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Indeed, this is the best approach for this. Good to hear that you already found
   it!
 * Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Colspan text align’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/colspan-text-align/#post-14775084)
 * Status: resolved