Solved

TD attribute that that has a line crossing over data

Posted on 2000-04-19
13
174 Views
Last Modified: 2013-11-19
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?
0
Comment
Question by:tgbekele
  • 4
  • 3
  • 3
  • +3
13 Comments
 
LVL 2

Expert Comment

by:burntout
ID: 2730892
Put the text between a <S> tag...
<S> Your Text Here </S>

The text will have one line thru it.
0
 
LVL 3

Expert Comment

by:davlun20080
ID: 2733385
Only way I know of...
0
 
LVL 7

Accepted Solution

by:
nettrom earned 50 total points
ID: 2736196
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 7

Expert Comment

by:nettrom
ID: 2736198
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
 
LVL 7

Expert Comment

by:nettrom
ID: 2736201
ack... connection problems today.  sorry 'bout the duplicate post.
0
 

Author Comment

by:tgbekele
ID: 2738683
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
 
LVL 3

Expert Comment

by:fibdev
ID: 2747524
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
 
LVL 2

Expert Comment

by:netbug
ID: 2762247
See your table tag will go like this :

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

bye!
0
 
LVL 3

Expert Comment

by:davlun20080
ID: 2762264
netbug,
Someone else already posted your solution as a comment....
0
 
LVL 3

Expert Comment

by:davlun20080
ID: 2762268
netbug,
someone else already posted your solution as a comment...
0
 
LVL 3

Expert Comment

by:davlun20080
ID: 2762327
Sorry for double post..
0
 

Author Comment

by:tgbekele
ID: 2770835
Used Nettron's idea using the <span ... > method.
But thank you very much for your suggestions
0
 

Author Comment

by:tgbekele
ID: 2770840
I like the <span style= ....> technique. Never used it before. Works like a charm.

Thank you very much.

Ted
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Randomize in Owl Carousel v1.3.2 6 44
Browser Chrome downloads colored link 5 41
Add box and text color changing for everything 1 26
Changing Two Areas of a Page 5 16
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question