Skip Navigation

[Resolved] Unwanted margin and padding, when trying to display post content in a view loop

This support ticket is created 3 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by thisen 3 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2132403
1.png
2.png
3.png
4.png

I'm trying to build a view loop for some custom post types. However, when I want to dynamically display the post body, wether it's with Toolset blocks or the standard Paragraph block, the content gets all scrunched up for some reason. As far as I can tell, it only happens on <p> tags, because I can make headings without the issue occuring. (See screenshot 1)

When I inspect element I can see two div's surrounding the <p> tag that causes this: "tb-container-inner" with a max width of 60%, and "wp-block-toolset-blocks-container tb-container" with a padding of 25px. (See screenshot 2 and 3)

If I uncheck these rules in inspect element, it ends up looking how I want, and expect it to look. (See screenshot 4)

I'm using OceanWP theme, and thought it might be the theme fiddling with the CSS rules, but as far as I can tell there isn't anything there that's causing it. Plus the naming of the classes with "tb" makes me think it's Toolset Blocks that's causing it, but I could be wrong of course.

So, any idea what's causing this, and how I can fix it?
Thank you

#2133577

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Indeed it seems to me coming from the toolset block but to rule out the theme and plugin conflict what if you try to switch to the default theme twenty twenty-one and check if you see the same.

If you see the same margin-padding issue, we will have to fix it using the custom CSS and for that I will require problem URL where I can see the issue as well as admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2138679

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

It seems you forget to share the problem URL. Can you please share problem URL and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2138905

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've added the following CSS code to your View's CSS box:

.tb-field .tb-container-inner { max-width:100% !important }

Can you please confirm it works as expected now.

#2139249

Yes it works, well halfway there at least. This fixed the margin rule, but there was still the padding rule. However, I went and fixed it myself by adding more to the code you provided:

.tb-field .wp-block-toolset-blocks-container { padding: 0px !important }

So technically it's fixed, however it seems like a bit of a band aid solution. It would be nice to know why the toolset blocks get these rules by default and if there was a way to change them more elegantly.

#2139251

My issue is resolved now. Thank you!