Archived topic
Can't remove padding from content
9 replies · Started by Eugene on November 2, 2018
Hi - I am using Toolset Layouts to create page content. I have set Page Builder Container to Contained.
However there is still padding on the left and right sides so the content does not align properly with the menu or the header element.
Any ideas ?
Hi there,
Can you link me to your site so I can take a look?
Thanks!
Thanks Tom but the site is currently on my desktop server. If I can't fix this myself I will get back to you when the site goes online.
Sounds good! :)
Hello Tom
The site is now online at nisca.org.uk
The problem once again :
I have used Toolset Layouts for page content. As you can see the content area and header area do line up at the sides - there is padding left and right.
BTW The header is a GP Element - I have hidden the logo area with :
add_action( 'after_setup_theme','tu_remove_header' );
function tu_remove_header() {
remove_action( 'generate_header','generate_construct_header' );
}
Thanks
Eugene
Hi there,
It looks like you have bootstrap added to the site, which is adding this CSS:
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
GP also uses that class, so you'll need to add this CSS to overwrite it:
.site.container {
padding: 0;
}
Let me know if this helps or not :)
Thanks Tom
The CSS has indeed reduced the padding but a you can see there is still a bit on both sides.
Using Chrome Inspector I have been able to fix this by setting container-fluid padding to 0 but I can't seem to create the correct CSS statement. Can you help please ?
That seems to be coming from Bootstrap as well: https://www.screencast.com/t/TsEgInTg
Their columns have padding applied - not sure if there's a class you can add to those elements that you can apply zero padding to?
Thanks Tom
This seems to have fixed the problem :
.container-fluid {
padding: 0px !important;
}
Awesome :)