TD attribute that that has a line crossing over data

I have data that is in each TD in a TABLE, I am trying to find a way to have a line print across the data so it looks like it has been crossed off, but the data should still show behind that single crossing line.

Is there such an attribute in a <TD> tag? Or does anyone have any other suggestions?
tgbekeleAsked:
Who is Participating?
 
nettromCommented:
The HTML 4.0 specification mentions two possible elements for "strike-through", S and STRIKE.  Both are deprecated though, in favour of doing the same thing through CSS.

If you wanted to do it with HTML using the S element, the example burntout gave is correct.  With the STRIKE element you use <strike> and </strike> instead.

The current trend is moving towards separation of content and presentation, so the preferable way is not to use presentational markup like this, and instead mark the content up using SPAN and apply style to it:

<span style="text-decoration:line-through;">your text goes here</span>
0
 
burntoutCommented:
Put the text between a <S> tag...
<S> Your Text Here </S>

The text will have one line thru it.
0
 
davlun20080Commented:
Only way I know of...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
nettromCommented:
The HTML 4.0 specification mentions two possible elements for "strike-through", S and STRIKE.  Both are deprecated though, in favour of doing the same thing through CSS.

If you wanted to do it with HTML using the S element, the example burntout gave is correct.  With the STRIKE element you use <strike> and </strike> instead.

The current trend is moving towards separation of content and presentation, so the preferable way is not to use presentational markup like this, and instead mark the content up using SPAN and apply style to it:

<span style="text-decoration:line-through;">your text goes here</span>
0
 
nettromCommented:
ack... connection problems today.  sorry 'bout the duplicate post.
0
 
tgbekeleAuthor Commented:
Burnout,

I tried your method ... but I got an error. I might have done it wrong. The lines I am printing are being place in a <TR> <TD> tag ... so at which point would I place the <S>. I tried to do it like this
<TR><TD><S> $line</S></TD></TR>
but that did not work.

Nettrom,

Haven't tried your method yet, but will do so Monday.
Thanks to all ...
any more suggestions much appreciated.

0
 
fibdevCommented:
I suggest nettroms comment ...


<TR><TD><span style="text-decoration:line-through;">your text goes here</span></TD></TR>

That should work with most newer browsers.
0
 
netbugCommented:
See your table tag will go like this :

<table attributes>
<tr>
<td><strike>type your text here</strike>
</td>
</tr>
</table>

bye!
0
 
davlun20080Commented:
netbug,
Someone else already posted your solution as a comment....
0
 
davlun20080Commented:
netbug,
someone else already posted your solution as a comment...
0
 
davlun20080Commented:
Sorry for double post..
0
 
tgbekeleAuthor Commented:
Used Nettron's idea using the <span ... > method.
But thank you very much for your suggestions
0
 
tgbekeleAuthor Commented:
I like the <span style= ....> technique. Never used it before. Works like a charm.

Thank you very much.

Ted
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.