Options

Changing the colour on a single line of text

FiestaRedFiestaRed Registered Users Posts: 146 Major grins
edited December 21, 2016 in SmugMug Support

I would like to change the colour on one single line of text that's in a content block. Does anyone have the code please?

Comments

  • Options
    AllenAllen Registered Users Posts: 10,012 Major grins
    edited December 21, 2016

    <span style="color: yellow">change this text only</span>

    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    FiestaRedFiestaRed Registered Users Posts: 146 Major grins

    Thanks Allen, but it's in a CSS text block and it will not let me ad HTML. Whenever I add your code, it just keeps the "change this text only" and drops the rest.

  • Options
    denisegoldbergdenisegoldberg Administrators Posts: 14,246 moderator
    edited December 21, 2016

    You might consider using an HTML content element instead of a text content element.

    If you are interested in an example, look at this page on my site - http://www.denisegoldberg.com/Kaleidoscope/. The text starting "Twist the kaleidoscope..." is an HTML content element, not a text content element. That allowed me to use html within the text.

  • Options
    AllenAllen Registered Users Posts: 10,012 Major grins
    edited December 22, 2016

    The html I posted is good for simple postings, if there are a bunch of these on the page or similar pages
    you could use <span class="myColorRed">change this text</span>
    Then in CSS you can change them all with .myColorRed {color:red} with one rule.

    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    FiestaRedFiestaRed Registered Users Posts: 146 Major grins

    Thanks again for all the help. I managed to add an HTML Content Block in the place where I wanted the coloured text.

Sign In or Register to comment.