Support » Plugin: Reusable Text Blocks » Have Only CSS in a Text Block

  • Resolved JoeCanWrite

    (@joecanwrite)


    Thanks for taking the time to create and maintain this great plugin.

    Do you know if it is possible to add just CSS to a text block, so that that when the shortcode is around some text in the post, that piece of text is styled with the CSS in the text block (such as background color, border etc?

    Thanks,

    Joe

    https://wordpress.org/plugins/reusable-text-blocks/

Viewing 1 replies (of 1 total)
  • Plugin Author Hal Gatewood

    (@halgatewood)

    When you are editing the Text Block, there is a ‘Visual’ and ‘Text’ button in the top right of the editor. Click into ‘Text’ mode and add any type of html you want there.

    <div style="background: red; color: blue; padding: 100px;">This is the content.</div>

    It should keep all the CSS styles if you do them inline. You could also just do a div with a class and then target it with CSS in your style.css from your theme.

    <div class="text-block-100">This is the content.</div>

    Hope this answers your question.

Viewing 1 replies (of 1 total)
  • The topic ‘Have Only CSS in a Text Block’ is closed to new replies.