stupid css question ... (alt color strikethrough)

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
zick
Forum Commoner
Posts: 33
Joined: Thu Aug 14, 2003 3:18 pm

stupid css question ... (alt color strikethrough)

Post by zick »

i think i've seen this in other places ... when using strikethrough on text is there a style attrib that makes it an alternate color ... like for a price of something online in black, but struck-through with red and a sale price next to it. i don't know if this is css or if it's something else.

thanks for any feedback.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

i think you'd have to layer a red strikethroug of just spaces over normal black text
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

s
{
	color: #0F0;
}

s span
{
	color:#F90;
}
---------
<s>test</s>
<s><span>test2</span></s>
randomblink
Forum Commoner
Posts: 51
Joined: Wed Jan 28, 2004 11:27 am
Location: Tulsa, Oklahoma, just this side of hell...
Contact:

Here is what you were asking for...

Post by randomblink »

I think this is what you were asking about... This maintains the coloring... It all has to do with the order of the color commands...

Good luck!

Code: Select all

<p>This is an example of the <span style="text-decoration: line-through; color: red;"><span style="color:black">strikethrough</span></span> method in css.</p>
Post Reply