• I am trying to replicate the old strikethough/s element via CSS and this is all I have found on how to do that:

    I add this to the CSS customize window:

    .struck {
    text-decoration: line-through;
    }

    and wrap the text thusly:

    <span class="struck;">the text I want struck out</span> 
    
    

    But what I get is the style info in the text as if it was never parsed by the renderer.

    • This topic was modified 3 years, 1 month ago by paul.
    • This topic was modified 3 years, 1 month ago by paul.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Howdy @paul

    Good day. Nice username! Anyway, it looks at first glance like your code should work.

    Ultimately, though, on a second glance (and this is often the case) there is a problem, by ONE character. Try this around your line-through text:

    <span class="struck">the text I want struck out</span>

    See the difference? You’ve got a semi-colon INSIDE your class name. It was “struck;” and it should be “struck”. 🤠

    Thread Starter paul

    (@paul)

    It was actually even simpler…I was in the visual editor, not the text editor. The semicolon was an issue for sure, so thanks for that.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How do you add text stying/CSS?’ is closed to new replies.