Tagged: , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #447078

    Hi,

    I would like to know how to format a single line of text in a text using a class. I’m able to format using an entire element but I want to focus on a specific text.

    Here is the visual text: The fox is a lazy jumper.

    I want to change a specific word in color and size. Here is what I have in the code now

    The fox is a <p class=”word”;>lazy</p> jumper.

    In my custom CSS, I have the following class:

    .word {
    color: red;
    font-size: 20px;
    }

    I’ve tried this and am unable to get this to work. Please advise what I could be doing wrong.

    sl

    #447121

    Maybe try adding !important

    .word {
    color: red;
    font-size: 20px !important;
    }

    #447315

    Thanks. I figured out what was the issue. Thanks rlogan2334.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Formatting a single word in a line of text using CSS’ is closed to new replies.