Align multiple button blocks with CSS

  • Author
    Posts
  • #160297
    mashet
    Member

    Hello Ricardo,

    Me again :)

    How do I make all the buttons in this landing page the same width? I know I can add CSS class to the blocks, but am not sure about the code.

    Instagram

    Thanks in advance,
    Madhu

    The blog I need help with is: (visible only to logged in users)

    #160298
    ricardpriet
    Theme Author

    Hello Madhu,
    hope you are well.

    Yes, add this CSS:

    .wp-block-button.button-300-px .wp-block-button__link,
    .button-300-px .wp-block-button .wp-block-button__link {
        width: 300px;
    }

    (Customise the width to less or more than 300px if you want)

    And then add the following CSS class in the Additional CSS class field to each button block:
    “button-300-px”

    Hope this helps :)
    Best,
    Ricardo

    #160310
    mashet
    Member
    Original poster

    Many thanks, that worked perfectly.

    Wishing you a happy new year Ricardo!

    #160311
    ricardpriet
    Theme Author

    Nice to hear that,
    Happy new year!

  • The topic ‘Align multiple button blocks with CSS’ is closed to new replies.