Northern Flame Posted August 13, 2007 Share Posted August 13, 2007 is their a way to make the underline have its own unique color? for example lets say i have test phrase, can i have "test phrase" be one color, and the underline a different color? Link to comment https://forums.phpfreaks.com/topic/64630-solved-underline/ Share on other sites More sharing options...
gurroa Posted August 13, 2007 Share Posted August 13, 2007 http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration ... The color(s) required for the text decoration must be derived from the 'color' property value of the element on which 'text-decoration' is set. The color of decorations must remain the same even if descendant elements have different 'color' values. Link to comment https://forums.phpfreaks.com/topic/64630-solved-underline/#findComment-322235 Share on other sites More sharing options...
wildteen88 Posted August 13, 2007 Share Posted August 13, 2007 is their a way to make the underline have its own unique color? for example lets say i have test phrase, can i have "test phrase" be one color, and the underline a different color? if you want the text to be one color and the underline to be another you'll want to apply a bottom border, eg: u { color: #333; /* apply text color */ text-decoration: none; /* remove the underline */ border-bottom: 1px solid #F00; /* apply a bottom border, to act as the underline. */ } That will give all text defined within <u></u> tags a light grey/black color and a red underline. Link to comment https://forums.phpfreaks.com/topic/64630-solved-underline/#findComment-322659 Share on other sites More sharing options...
Northern Flame Posted August 13, 2007 Author Share Posted August 13, 2007 alright thanks Link to comment https://forums.phpfreaks.com/topic/64630-solved-underline/#findComment-322774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.