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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted August 13, 2007 Author Share Posted August 13, 2007 alright thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.