Skip Navigation

[Resolved] Full width button

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

Problem:
The customer wanted to make certain buttons on their website full-width to ensure a consistent and appealing layout across different parts of the site.
Solution:
We advised applying a CSS rule (width: 100%;) to make the buttons full-width. This rule was suggested to be added to the .tb-button__link selector to affect all buttons globally or to specific buttons using data attributes to restrict the changes to buttons shown in the provided screenshot:
Option 1:

.tb-button__link{
    width: 100%;
}

Option 2:

.tb-button[data-toolset-blocks-button="ff923b00a782de616999d8bee8398d8a"] .tb-button__link, .tb-button[data-toolset-blocks-button="c43a52d063fa7692dec80f6313473a50"] .tb-button__link{
    width: 100%;
}

Relevant Documentation:
https://toolset.com/course-lesson/adding-custom-css-to-templates-archives-and-views/

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 1 reply, has 2 voices.

Last updated by Mateus Getulio 7 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2695557
Knipsel.JPG

I want to have a Full width buttons here (also attached):
hidden link

I already have this code for other parts on my site:
}

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

#2695625

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

You could apply the code: width: 100% to the following css selector:

.tb-button__link{
	width: 100%;
}

Alternatively, if you want to limit the change to only those card buttons available in the screenshot, you could try the following code:

.tb-button[data-toolset-blocks-button="ff923b00a782de616999d8bee8398d8a"] .tb-button__link, .tb-button[data-toolset-blocks-button="c43a52d063fa7692dec80f6313473a50"] .tb-button__link{
	width: 100%;
}

https://toolset.com/course-lesson/adding-custom-css-to-templates-archives-and-views/

Please give it a try and let us know the results.

Best,
Mateus

#2696042

Thanks