XF 2.2 HTML Widget - Background colour/image

DaveL

Well-known member
Looking to create some custom HTML widgets, however struggling at the start!
I've created the widget and used this so I get a black background, but no joy.
HTML:
<html>
<body style="background-color:black;">

Test

</body>
</html>

Any help appreciated!
 
Don't start with those tags.
HTML widgets are already nested between
HTML:
<div class="block">
    <div class="block-container">
        ...
    </div>
</div>
Unless you check the advanced mode box...
And to customize your widget, use classes and your extra.less file instead.
 
One quick question, with advanced mode, there is no space between the widgets when viewing on a narrow window. What would I need to add to add a bit of space between them?

space.webp
 
If it's just one widget then inline styling is fine.

If the styling is going to be used in multiple places then yes, I would use a class so it only needs to be managed/updated in one place.
 
Back
Top Bottom