Skip navigation
philosopher_poet
Currently Being Moderated

How to underline text with a different colour ?

Nov 21, 2011 8:37 AM

Could someone please tell me if its possible to underline text with a different colour ?

 

I am designing a website and my client has asked that the white text is underlined in red.

 

I've not seen this done before but would be grateful if someone could enlighten me.

 

Thanks in advance

 
Replies
  • Currently Being Moderated
    Nov 21, 2011 2:41 PM   in reply to philosopher_poet

    philosopher_poet wrote:

     

     

    Could someone please tell me if its possible to underline text with a different colour ?

     

    I am designing a website and my client has asked that the white text is underlined in red.

     

    I've not seen this done before but would be grateful if someone could enlighten me.

     

    Thanks in advance

     

    You need to use border-bottom to underline in different color.  For example you might have some text like this:

     

    <p>I want some text <span class="green">in this line to be underlined</span> in green.</p>

     

    I would then create a css style like this:

     

     

    .green {

        border-bottom: 2px green solid;

    }

     

    This does the work adequately.

     

    Good luck.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points