• Resolved DoingShanghai

    (@doingshanghai)


    Hi,

    I’m trying to create separate divs for certain texts so that I can style them differently. I want to have certain words a different font and color etc, and want to do it through the style.css file rather than in the page editor (so that if I want to change the style it will apply to all of them).

    I tried creating a new div by writing <high>hello</high> in my page editor, and writing high { color: #1181AA !important;} in my style.css file. This doesn’t work though. Is there another way around this?

    I would also like to use this to create separate styles for images and links, too.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can’t make up HTML tags :). This should work though:

    <span class="high">hello</high>

    The CSS:

    .high {
     color: #1181AA;
    }

    Don’t use important except in very, very limited situations – it’s not good practice.

    For images and links you can likely use the existing CSS classes/ids and/or HTML mark-up in your site. A browser tool like Firebug should help you find those.

    Thread Starter DoingShanghai

    (@doingshanghai)

    aw brilliant thank you!

    ill take that advice on board, thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Target and style specific text’ is closed to new replies.