I am using make theme bb theme foundry. I want to remove padding from both side image

I add this code to style.css file under body tag

    margin-left: 0px;
    margin-right: 0px;

then tried this code nothing happened.

body { padding:0; }
  • this isn't a WordPress question and would be better asked on stackoverflow which deals with html/css questions... You would also need to give a URL so commenters have something to work from. Oct 15, 2015 at 13:13

1 Answer 1


Use the developer tools in your browser (i.e inspector in Chrome or firebug in Firefox) to see where the padding is coming from.

Either the padding is applied to something other than the body, or the padding is applied to the body but is still overriding your CSS. For example:

body.class {
    padding: 20px;

Would override your CSS. or

body {
    padding: 20px;

Declared after your CSS would still override.


Using developer tools you can see where the padding is applied to. The header padding is coming from the .container div, as you can see here:

The padding on the body is coming from 2 places, the .site-content div then the .container div, as you can see here:

How you remove (or reduce) this padding depends how you are editing the CSS. If you are working on the main style.css file then you need to change the CSS for .container on line 471 and .site-content on line 1265. You can see the file and line number of the CSS at the top right of the CSS in developer tools.

I can see the theme has custom CSS as well, so if you use that you need to add these to the custom CSS:

.container, .infinite-footer-container, .page-template-template-builder-php .entry-content > .twitter-share {
    padding: 0 10px;
.site-content {
    padding: 0;

Obviously change the padding to whatever you want it to be.

I hope that helps (and all makes sense).

  • i extremely sorry for late reply because my PC psu was damaged .OK now to the topic website is chiku.pe.hu
    – chiku
    Oct 17, 2015 at 20:00
  • what i tried to remove the white space from the header i added {margin left: -10px;} this code to header div successfully i managed to remove space from left side but the problem is a grey color space appears on right side image here s29.postimg.org/3lgj9jy3b/untitled.jpg
    – chiku
    Oct 17, 2015 at 20:08
  • the problem with using negative margin is you are basically shifting the header to left, that is why you get the grey background showing on the right. I'll update my answer on how to remove the padding now
    – Cai
    Oct 18, 2015 at 7:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.