A text decoration question

O

Old HTML Slinger

On rare occasions I need to show words or letters being crossed out.
Since the old <strike> tag is deprecated I've put a statement in my
..css file that says:

..crossout {
text-decoration: line-through;
}

But the line that it puts through the letters is pretty thin. Is there
any way I can add something to the above that will thicken the line?
Any other ideas for getting that line thicker, more noticeable?
 
L

Leonard Blaisdell

Old HTML Slinger said:
But the line that it puts through the letters is pretty thin. Is there
any way I can add something to the above that will thicken the line?
Any other ideas for getting that line thicker, more noticeable?

Change the font on your site. Best I can do. Better ideas may be
forthcoming.

leo
 
S

Sid

On Tue, 22 Aug 2006 06:31:47 GMT, Old HTML

: On rare occasions I need to show words or letters being crossed out.
: Since the old <strike> tag is deprecated I've put a statement in my
: .css file that says:
:
: .crossout {
: text-decoration: line-through;
: }
:
: But the line that it puts through the letters is pretty thin. Is there
: any way I can add something to the above that will thicken the line?
: Any other ideas for getting that line thicker, more noticeable?


Try
..crossout {
text-decoration: line-through; font-weight:bold;
}


Remember, the characters it strikes out will be bold too.

Sid
 
J

Jukka K. Korpela

Old HTML Slinger said:
On rare occasions I need to show words or letters being crossed out.

No you don't.

And you don't need to multipost. Multiposting is bad. Don't do multipost,
mm'kay?

See my answer in comp.infosystems.www.authoring.html.

Oh, and please keep using a foolish From line if you want to be ignored by
people who know correct answerrs.
 
S

Stan McCann

On rare occasions I need to show words or letters being crossed out.
Since the old <strike> tag is deprecated I've put a statement in my
.css file that says:

.crossout {
text-decoration: line-through;
}

But the line that it puts through the letters is pretty thin. Is
there any way I can add something to the above that will thicken the
line? Any other ideas for getting that line thicker, more
noticeable?

Just an untested thought. Use a span set to half line height with a
bottom border and set border to desired thickness. I don't believe
there is a way to directly make line-through thicker.
 
S

Stan McCann

On Tue, 22 Aug 2006 06:31:47 GMT, Old HTML

: On rare occasions I need to show words or letters being crossed
: out. Since the old <strike> tag is deprecated I've put a statement
: in my .css file that says:
:
: .crossout {
: text-decoration: line-through;
: }
:
: But the line that it puts through the letters is pretty thin. Is
: there any way I can add something to the above that will thicken
: the line? Any other ideas for getting that line thicker, more
: noticeable?


Try
.crossout {
text-decoration: line-through; font-weight:bold;
}


Remember, the characters it strikes out will be bold too.

Won't that also make the text bold? That may defeat the purpose.
 
S

Sid

: > Remember, the characters it strikes out will be bold too.
:
: Won't that also make the text bold? That may defeat the purpose.


Read the "Remember,..." bit

Sid
 
T

Toby Inkster

Old said:
But the line that it puts through the letters is pretty thin.

You *might* have some success with:

<span class="crossout">&nbsp;<span>Hello</span>&nbsp;</span>

SPAN.crossout {
text-decoration: line-through;
letter-spacing: -2px;
font-weight: bold;
}

SPAN.crossout SPAN {
letter-spacing: 2px;
font-weight: normal;
}

But it will probably be browser-dependent.
 
D

dorayme

Sid said:
: > Remember, the characters it strikes out will be bold too.
:
: Won't that also make the text bold? That may defeat the purpose.


Read the "Remember,..." bit

Sid

This was a nice thread indeed. I enjoyed it. Yes, you did mention
the fatal drawback to your suggestion yourself!
 
S

Stan McCann

: > Remember, the characters it strikes out will be bold too.
:
: Won't that also make the text bold? That may defeat the purpose.


Read the "Remember,..." bit

Oops, missed that. Later, I got to thinking about the solution I
proposed and it runs into the same problem; worse, even, it'd leave
only have half a line (height) of text. Although there may be a trick
of floating text over a solid line using a transparent background only
for the stike out part. I've done something like that to achieve dot
leaders.
 
D

dorayme

Old HTML Slinger said:
On rare occasions I need to show words or letters being crossed out.
Since the old <strike> tag is deprecated I've put a statement in my
.css file that says:

.crossout {
text-decoration: line-through;
}

But the line that it puts through the letters is pretty thin. Is there
any way I can add something to the above that will thicken the line?
Any other ideas for getting that line thicker, more noticeable?

_____</span><span style="position:relative;right:2.9em;"> words
struck thru with a bold line.</span></p>


</runs off fast and hides>
 
O

Old HTML Slinger

Change the font on your site. Best I can do. Better ideas may be
forthcoming.

Thanks, but that'll also bold the text, which is not what I was
looking to do.
 
O

Old HTML Slinger

No you don't.

Actually, I do. I am not asking an idle question.
And you don't need to multipost. Multiposting is bad. Don't do multipost,
mm'kay?

Sure, Mr. Mackey. It was the result of an accident.
See my answer in comp.infosystems.www.authoring.html.

I shall do so.
Oh, and please keep using a foolish From line if you want to be ignored by
people who know correct answerrs.

Oh, come now. Am I required to get even more spam by telling more
about myself? And I've been dealing with HTML since 1995, when I got
my first Web site; so I really am an old HTML slinger.
 
D

dorayme

Old HTML Slinger said:
Well, it's struck through, and it's red, but it's the same width as
the ordinary strikethrough line.

Yes, but did you play about and change the font-size for the
"_____"? It is an impossible thing really but it looked thicker
on my main Browser. You should say why you want to do this and
how much of it is needed, there may be other solutions. You could
maybe float a gif of a red line or rel position it... you need to
play about... or if it is very little that needs this, a gif of
the text too ... I don't know. Talk more to old Korpela, he might
soften on you...
 
J

Jonathan N. Little

Jonathan said:
Why? Looks the same to me in Seamonkey and Firefox, maybe a slight
heavier, but maybe tweaking your padding may improve it.

Actually my error, the padding only effects the strikes width, the
difference seems to be how dark Gecko displays gray vs Opera and IE.
Your PNG is aliased with bands of gray pixels. If you make the image
just 2 colors, black and white, and I reduce the strike to only 3 pixels
high they look identical in all the browsers.
 
J

Jukka K. Korpela

dorayme said:
You have evidence for this?

The proof is trivial. Anyone who multiposts hasn't analyzed his problem
properly. Whatever he might need in general, his real need with the problem
at hand is to analyze the problem better. Hence he does not need to try to
solve the wrong problem. QED.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top