PDA

View Full Version : How to underline in a different colour ?


philosopher_poet
11-21-2011, 05:01 PM
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

Corrosive
11-21-2011, 05:11 PM
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 can't as far as I know. Not a proper underline anyway. Perhaps a red border-bottom might do.

gentleone
11-21-2011, 05:38 PM
It's possible, but be aware that if users see text underlined they think it's a link, so better educate your client with that and suggest another and better solution for it.

If it's really a stubborn client that won't listen, then to hell with his website :) and do it like this:
<p>This is some text with <span>a part that is red underlined</span></p>CSS:

p span {
display: inline-block;
border-bottom: 1px solid red;
}

philosopher_poet
11-22-2011, 12:53 PM
bedankt:razz:

gentleone
11-22-2011, 05:59 PM
bedankt:razz:
Hey.. geen dank, graag gedaan ;)