Title: Centering problem
Last modified: March 15, 2023

---

# Centering problem

 *  Resolved [danielshalar](https://wordpress.org/support/users/danielshalar/)
 * (@danielshalar)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/centering-problem-3/)
 * Hey, I have this product page in **Mobile viewpoint** and i’m looking to center
   the Color, Connection and Size div classes to the center…
 * I’m using a third party plugin for these variations called XT Variations but 
   it does not have an option to center in mobile view.
 * I’ve tried center aligning them but it did not work, any solutions?
 * > [View post on imgur.com](https://imgur.com/a/jvE2lvP)
    -  This topic was modified 3 years, 2 months ago by [danielshalar](https://wordpress.org/support/users/danielshalar/).
    -  This topic was modified 3 years, 2 months ago by [danielshalar](https://wordpress.org/support/users/danielshalar/).
    -  This topic was modified 3 years, 2 months ago by [danielshalar](https://wordpress.org/support/users/danielshalar/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcentering-problem-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/centering-problem-3/#post-16565749)
 * Hello
 * Using CSS code you can center the text, for example you can use:
 *     ```wp-block-code
       @media only screen and (max-width:600px){
           td.label{
                 text-align: center !important;
           }
       }
       ```
   
 * You can add custom CSS code by going to WP _Dashboard » Appearance » Customize»
   Additional CSS_.
 * Let us know if that worked for you.
 *  Thread Starter [danielshalar](https://wordpress.org/support/users/danielshalar/)
 * (@danielshalar)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/centering-problem-3/#post-16566818)
 * Thank you for your reply [@ihereira](https://wordpress.org/support/users/ihereira/)
 * Unfortunately that did not center the text and buttons properly.
 * You can see that the text is “centered” but not to the page width, same with 
   the buttons and images they are not in the center.
 * Like I said i’ve tried doing text-align: center to some of the classes but it
   gave me the same result as yours.
 * > [View post on imgur.com](https://imgur.com/a/OTUR1CW)
 * Looking forward to get this fixed..
    -  This reply was modified 3 years, 2 months ago by [danielshalar](https://wordpress.org/support/users/danielshalar/).
 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/centering-problem-3/#post-16569609)
 * Hello [@danielshalar](https://wordpress.org/support/users/danielshalar/),
   I understand
   you want to centre the buttons too, here’s a modified CSS snippet.
 *     ```wp-block-code
       /*  Center option buttons on mobile  */
   
       @media only screen and (max-width:600px){
           td.label{
                 text-align: center !important;
                   }
       ul.xt_woovs-swatches {
         display: flex;
         justify-content: center;
         align-items: center;
         flex-wrap: wrap;
       }
   
       ul.xt_woovs-swatches li.swatch {
         margin: 5px;
       }
       }
       ```
   
 * 
   End result: [https://d.pr/i/pHBdUD](https://d.pr/i/pHBdUD)
 * I should note that customizing third-party plugins are not within our [scope of support](https://woocommerce.com/support-policy/)
   so if you need more help with this it might be better to contact the plugin author
   directly. : )
   Cheers!
 *  [xue28 (woo-hc)](https://wordpress.org/support/users/xue28/)
 * (@xue28)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/centering-problem-3/#post-16637649)
 * Hi there!
 * We haven’t heard back from you in a while, so I’m going to go ahead and mark 
   this thread as resolved. If you have any other questions please start a new thread.
 * Thanks!

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

The topic ‘Centering problem’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [xue28 (woo-hc)](https://wordpress.org/support/users/xue28/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/centering-problem-3/#post-16637649)
 * Status: resolved