wordpressblogselementorwordpress-theme-astra

A problem with WordPress that creates a white space for itself


As you can see in the pictures, in the editor mode, my single post template is full page, but when outputting, a series of white spaces are created around it. Does anyone have a solution? (It is Astra format) [enter image description here](https://i.sstatic.net/0kLtle9C.png)

I tried almost everything on the internet and it didn't work


Solution

  • It's because your post container has a default padding.

    1. Try using inspect element
    2. Find the container
    3. Address the container with specific classes and ids
    4. add your css snippet into your style.css or output.css or any css file that your website loads it.

    An example of css snippet usage for removing default padding:

    .your-custom-class {
        padding: 0px;
    }
    

    If the css code doesn't remove your container's padding, try use more specific address in hierarchy css template or try using !important after the 0px