Skip Navigation

[Resolved] Button full width

This thread is resolved. Here is a description of the problem and solution.

Problem:

I want to have full-width buttons in the WordPress archive loop, but the buttons' width is not extending on all devices.

Solution:

Add the following CSS code to your theme:

.post-type-archive-product .wp-block-toolset-views-view-template-block .tb-button .tb-button__link {
    width: 100%;
}

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 8 months, 3 weeks ago.

Assisted by: Christopher Amirian.

Author
Posts
#2691090
Button.JPG

I want to have a full width buttons (hidden link) in the wordpress archive loop.
How can I do this so the button width is full on all devices?

#2691265

Christopher Amirian
Supporter

Languages: English (English )

Screenshot 2024-04-07 at 17.24.56.png

Hi there,

Please select the Button in the block editor and on the right sidebar under "Style Settings" you will see a MARGIN/PADDING option.

At the top right section of that option, you will be able to select the device type and set proper margin or padding. (check the screenshot)

Set 0 for all devices there.

That will remove any padding or margin by default, and the rest is dependant on your theme CSS.

Thanks.

#2691399
button.JPG

This is not working (check the screenshot)

#2691558

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Would you please add the CSS code below to your theme?

.post-type-archive-product .wp-block-toolset-views-view-template-block .tb-button .tb-button__link {
    width: 100%;
}

That ensures the width of the button is 100% in the context of the boxes in question.

Thank you.

#2691819

Super. Thanks!