New Landing How can we help? Themeforest Theme Support Dante How to change color of the first letter of a specific word

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #223958
    solidsn2004
    Member
    Post count: 208

    Hi,

    I wanted to target a specific word in the whole website and change the color of the first letter.
    Can this be done with only CSS or I need some javascript?
    For example the word “Legal” I wanted to change the color of “L” letter with red.
    Can you please help me out?

    I have tried using ::first-letter but it doesn’t really work.

    Let me know if you can help me.
    Thanks in advance.

    #223959
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    I searched a bit and guess that will complicated to achieve that. With css I think there is no solution.
    Only if you wrap the word you want inside a span element with a specific css class.

    -Rui

    #223961
    solidsn2004
    Member
    Post count: 208

    Thanks Rui,

    I thought so as well. I will try and find a way to do it with Javascript.
    Cheers.

    #223962
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    ok. will also be difficult because at the end you will always need to change the color with css properties even inside the js. Can’t say it’s impossible, but will be difficult.

    Good luck mate.

    -Rui

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register