Hello everybody,
we are about to use the builder in our upcoming projects. We really like the drag & drop interface. But we were wondering, how we can stop the builder from rendering the margin-bottom property for each class=so-panel. I know, that I can set this property globally in the builder settings. But this doesn’t help, because I can only enter “0px”.
When the CSS code is rendered for each site, the panels parent CSS IDs also get rendered.
Example:
#pl-179 .panel-grid-cell .so-panel
Thus it’s impossible to adjust these settings in the style.css in my theme: it gets overwritten by the higher specificity of the id-property. And also because the rendered CSS Code is rendered in the head of each site.
My Question: Is there a way to completely stop rendering the margin-bottom?
I already discovered the documentation and section about filtering the CSS (https://siteorigin.com/docs/page-builder/hooks/css/). But I didn’t find any help on my specific question.
Any ideas, anybody?
Greetings from Berlin/Germany
Lukas
Hi Lukas,
Could you clarify why you’re unwilling to use the row bottom margin setting? It’s doing exactly what you want so I’m not too sure why that’s not the ideal method for you. (just to clarify, please ensure you don’t input a unit of measurement into that field).
Hey Alex, thank you for your answer!
(Just to clarify: I didn’t put a measurement into that field, just the number 0.)
I don’t want to use the row bottom margin setting, because I want to specify all the margins ONLY in my CSS-file.
The reason behind this is: I want to specify different margins for different modules. For example all images (.widget_sow-image) should have 0.5em margin but all normal text-editors (.widget_sow-editor) should have 1.5em margin.
This is not possible, if the margin-bottom property gets rendered for each id, because of the specificity order in CSS.
Which brings me back to my question: can I somehow completly stop the builder to render the margin-bottom property?
Hi Eigenstil,
Sorry for the delay. I’m going to forward this to the development team. Hopefully they’ll be able to help you with this.
Hi Eigenstil,
Please try the following PHP:
Technically this works by outputting an invalid value, which is a bug. This will be fixed in the next version (as in no CSS will be output) but at least for the time being it works.
Hey Alex,
thank you very much for he solution – this works (although it’s not the best CSS driven way).
I’m really looking forward for the coming update!
Greetings from Berlin, Lukas