[Support request] Adding inline CSS to Block elements

Home Forums Support [Support request] Adding inline CSS to Block elements

Home Forums Support Adding inline CSS to Block elements

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2341399
    Ben

    Hi,
    When using block ELEMENTS, how can I add inline styles that target the specific block and only load when the block is loaded? The CSS I want to add are options that are not available in standard block settings.

    I use Simple CSS for global AND page specific CSS, but would really like to have this option on template blocks (elements)

    Many thanks for any help.

    Ben

    #2341480
    David
    Staff
    Customer Support

    Hi there,

    you can’t inline styles in the Blocks HTML, as the editor will basically reject those changes.
    if you want to just load some CSS in that block element then you can:

    1. insert a HTML Block as the top most block in the Element.
    2. in the HTML block add your CSS Styles.
    2.1. make sure to wrap the CSS in style tags eg.

    
    <style>
    /* Your CSS */
    </style>
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.