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
https://forums.phpfreaks.com/topic/64630-solved-underline/#findComment-322235
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
https://forums.phpfreaks.com/topic/64630-solved-underline/#findComment-322659
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.