Jump to content

[SOLVED] underline


Northern Flame

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.