Hello,
I am trying to add padding within the HTML/WYSIWYG widget and for some reason no matter what I do it will not work. Anyone run into a similar issue? Anyone have some code that I can drop in to reflect some space between the words and border?
Hello,
I am trying to add padding within the HTML/WYSIWYG widget and for some reason no matter what I do it will not work. Anyone run into a similar issue? Anyone have some code that I can drop in to reflect some space between the words and border?
The widgets don’t respect padding in the html. You have to do this in CSS which is kind of crazy but works.
For example, to pad all sides of your HTML widget by 30px
#doc-widget-#### div.content.clearfix {
padding: 30px;
}
(replace #### with the specific HTML widget ID).
You can customize the top, bottom, left and right padding individually if preferred; check out the options available for the CSS padding property.
I have a text box at the top of every page for which I want to apply padding. I know nothing about CSS so used a table as a quick solution. I know that doesn’t work for accessibility so was planning on revisiting at a later date. Well that time has arrived.
Thank you
Is there a way for me to add CSS so that it applies to all HTML widgets? Or is that not a good idea?
If I was to apply the CSS for each individual widget that I use the CSS will become very long. Would this cause a problem on Docebo?
What is the easiest way for me to locate the HTML widget ID?
Thanks
Hey
<div style="padding: 5px;">
enter your content here....
</div>
You can insert this by selecting the ‘HTML’ view in the editor.
You can apply this instead globally to all HTML widgets if you would like, instead of the class suggested above which is used in many places, would use the following instead:
.htmlwidget {
padding: 5px;
}
Normally, I am a big fan of isolating to just pages or widgets for these kinds of changed, but in this particular case, I would view it more as it should be consistent around the platform, so don’t see a reason not to just apply it globally here. You can then use selection of pages or widgets by IDs to only apply to exceptions.
If you needed to do it by selecting, yes Docebo can handle many widgets and pages for selecting.
Hi
I had previously added CSS for each individual html widget which worked. I have now applied the global CSS for html widgets as per your suggestion.
Many thanks for your response. Much appreciated.
Enter your email address or username and password below to log in to Docebo Community. No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.