Title: Problem with Button Alignment
Last modified: August 29, 2022

---

# Problem with Button Alignment

 *  [MurnaghanAP](https://wordpress.org/support/users/murnaghanap/)
 * (@murnaghanap)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/problem-with-button-alignment/)
 * HI,
    I have a number of pages with link buttons, with the buttons centre aligned
   on the page. When, however, I have added a new buttons block the new button no
   longer aligns to the centre – it becomes left aligned. This is even with selecting
   centre alignment both in the Buttons block and the button itself. I have tried
   converting the old individual buttons to the new ‘Buttons’ block but this just
   made matters worse. Also on this example page the final two buttons still align
   centre even though they have the same settings as all the others that are aligning
   left. I have tried both Chrome and Edge browsers with the same result. Also in
   the editor they align centre – it is only on the live pages they don’t appear
   to work. Please help me to resolve. Thank you. Adrian.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-button-alignment%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [station7](https://wordpress.org/support/users/station7/)
 * (@station7)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/problem-with-button-alignment/#post-15959431)
 * Well, I can’t really help you with the WordPress editor, but in looking at your
   code, I can tell you what’s actually happening!
 * The buttons ARE centred within their container, but the problem is that the container
   is the same size as the button, so you can’t see it.
 * The buttons that look centred have a container that is the width of the entire
   line. The ones that don’t have small containers, and the line they are on is 
   broken up into smaller containers.
 * Working:
 *     ```
       <div class="is-layout-flex wp-block-buttons">
           <div class="wp-block-button aligncenter is-style-outline">
       ```
   
 * Not working:
 *     ```
       <div class="is-content-justification-center is-layout-flex wp-container-3 wp-block-buttons">
       <div class="wp-block-button aligncenter is-style-outline">
       ```
   
 * You see those extra classes “is-content-justification-centre” and “wp-container-
   3” (or “wp-container-2” on some) – those need to be removed. I’m not sure how
   you can do this in the editor, but if there is an HTML view you can just remove
   from there.
 *  Thread Starter [MurnaghanAP](https://wordpress.org/support/users/murnaghanap/)
 * (@murnaghanap)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/problem-with-button-alignment/#post-15959487)
 * Hi,
    Thank you for these details – I can see the difference in the code but don’t
   know how this has been created by the editor or how I can fix it. Unfortunately,
   if I try to edit the HTML in the editor it crashes the block. I hope that someone
   will be able to identify the issue with the editor and advise on how to edit 
   this (and my other pages with the same issue). Adrian.
 *  [lisa](https://wordpress.org/support/users/contentiskey/)
 * (@contentiskey)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/problem-with-button-alignment/#post-15959730)
 * *For the display of “Contact the Organizer” which appears to be centered when
   I view in chrome browser…
    BUTTONS SETTING – does not use the center styling 
   BUTTON SETTING- does use the center styling
 * *Review the settings for BUTTONS and BUTTON for the display that does not appear
   centered. (editing the HMTL is possible to fix the display, but not recommended)
 * *Suggestion: delete the links that are not displaying as you desired and start
   with a new BUTTONS block. You can also DUPLICATE the BUTTONS block that is working
   well and change the text and links.
 * You can duplicate a block in the “list view” area
 * > [List View](https://wordpress.org/support/article/list-view/)
 *  Thread Starter [MurnaghanAP](https://wordpress.org/support/users/murnaghanap/)
 * (@murnaghanap)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/problem-with-button-alignment/#post-15960763)
 * Hi Lisa,
    Thanks for the suggestions. I tried creating new button blocks from
   scratch but couldn’t get them to centre align (even when centre aligned in the
   editor). I would really like to understand what I may be doing wrong creating
   new buttons and whether the Buttons Place holder or the button itself should 
   be centre aligned. Subsequently I did successfully duplicate the one that still
   worked to create buttons that work. Thanks again for everyone’s support – please
   let me know if anyone has a solution for this.

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

The topic ‘Problem with Button Alignment’ is closed to new replies.

## Tags

 * [buttons](https://wordpress.org/support/topic-tag/buttons/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [MurnaghanAP](https://wordpress.org/support/users/murnaghanap/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/problem-with-button-alignment/#post-15960763)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
