Hello! I’d like to start by saying that all the questions I’m about to ask are for custom module creation to be used on the most recent Drag-and-Drop Builder (with the rendered UI, not the one that uses blocks) for emails only.
I’m trying to create a module that allows users to choose to add an icon next to a bunch of text (although I already had this same problem on other situations). The problem being that since I’m only allowed to use the D&D Builder, I can’t add any custom CSS since I don’t get to customize the <head> section, and I’m also constrained by normal email limitations.
Now my image (icon) is always the same size (64px), so adding to that a 20px gap, I end up with a <table> element that is 84px wide. Now, the <table> that contains the text, that needs to be next to it can be any size, because when I import it into my email I want the users to be able to decided if they want to had some padding (using the “Fill” option all modules have in the builder) or not. My issue is that I need to set a width, or else it can’t be side-by-side with the icon’s <table>, but since it is variable, I can’t just put a random number and be done with it.
I’ve looked at Hubl documentation, but it’s always a bit dfficult to find answers when you are working with just emails and the D&D Builder, since usually people ask things for the other builder or landing pages.
Ideally, I would like to know if there’s a filter/variable/function that allows me to get the width of another element (maybe by using a custom ID on), that way I can check the size of the global container <table> that my icon and text are on (that I have on my custom module as well), and substract the size of the icon <table> (84px) to end up up with an absolute number that allows the other <table> to stand next to it.
And if so, of course this bears the question of the responsive side of it. If I can use an absolute number on the text’s <table> by using a variable, it means that on smaller screens this element is going to be too wide. Unfortunately for me, Hubspot has a mobile-first approach even for emails, so all the queries are made for desktop, on mobile everything is always 100% unless the element has a width attribute in which case it just uses that width and goes with it. And since I can’t use custom CSS…
Maybe what I’m asking here is too complex to be handled on the D&D Builder, but that’s the only option I have. So if anyone would know how to handle this problem, I would be very grateful!
Thanks.