• Resolved jlanpheer

    (@jlanpheer)


    I need a bit of guidance on how to customize the the Gutenberg element ‘.wp-block-uagb-container’. I am running the most recent version of WordPress with the Astra Pro theme but am creating a custom plugin to build a customized contact page for a site and am using Gutenberg blocks (in this case a container) for many of the elements.

    My problem is that i’m attempting to create a custom SVG div shape as a background and it does not QUITE stretch 100% across the height or width of the viewport. After a TON of digging, i found that the above element had a default padding value of 10px and that was causing my custom background div to not QUITE cover the viewport as intended. Working with Chrome Dev Tools, i found that setting the padding value of this element to zero on the fly fixes the problem. Fair enough, i have attempted to provide some custom CSS in the theme to set the padding (and margin) to zero with this:

    .wp-block-uagb-container {
        padding: 0;
        margin: 0;
    }

    The above changes nothing, i’m a bit flummoxed as to why. I also tried ::before and ::after styling of the element, such as this:

    .wp-block-uagb-container::before {
    	content: '';
    	padding: 0;
    }
    
    .wp-block-uagb-container::after {
    	content: '';
    	padding: 0;
    }

    Same result, no change in behavior. Could someone please help me out and explain what is going on here…. why doesn’t the above fix the problem and how can i solve this problem? MUCH obliged for any help or suggestions that anyone can offer. Many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help customizing padding of wp-block-uagb-container’ is closed to new replies.