Best Answer

HTML Widget Padding


Userlevel 2
Badge

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? 

 

icon

Best answer by Allan 16 May 2023, 19:02

View original

2 replies

Userlevel 7
Badge +5

The widgets don’t respect padding in the html. You have to do this in CSS which is kind of crazy but works. 

Userlevel 4
Badge

@lrodman is correct. You will need to adjust the padding in CSS.  I would recommend doing so by widget ID to ensure the CSS you apply is strictly for the unique object you want. 

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.

Reply