Archived topic
block element after content - spacing not working
5 replies · Started by Carlo on November 9, 2020
Hi there,
I have created a block element.
Hook: generate_after_content
Location: post Category -> blog
It correctly shows up but I cannot make any spacing (margin / padding) show up.
I set them in the generatepress blocks (container, headline...), I can see them applied in my block element preview but then they don't work in posts.
Please see the link: in the block there are the wpshopost list and its title above it
For testing purpose I have applied margin to the headline (above and below) and padding+margin to the parent container (that contains both the headline and the wpshowpost list) but they all are showed up at zero value.
Thank you. Best wishes
Hi there,
what happens if you Change the CSS Print Method to Inline in Dashboard > Settings > GenerateBlocks ?
Hi David,
yes, now it's working correctly.
I am working hard on optimizing performance, do you think it could be possible to fix it stickying to "external file" css option?
I see that the note under the settings option says "Generating your CSS in external files is better for overall performance"
Thanks
I wouldn't be overly concerned about that notice. The amount of inline CSS that GB is adding in your case is minimal and the performance improvement will be unnoticeable. Also if you're using a Cache/Optimization plugin it will be able to combine inline CSS
ok David, thank you. Have a nice day.
Glad to be of help