A text decoration question

Discussion in 'HTML' started by Old HTML Slinger, Aug 22, 2006.

  1. 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?
     
    Old HTML Slinger, Aug 22, 2006
    #1
    1. Advertising

  2. In article <>,
    Old HTML Slinger<> wrote:

    > 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

    --
    <http://web0.greatbasin.net/~leo/>
     
    Leonard Blaisdell, Aug 22, 2006
    #2
    1. Advertising

  3. Old HTML Slinger

    Sid Guest

    On Tue, 22 Aug 2006 06:31:47 GMT, Old HTML
    Slinger<> wrote:

    : 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
     
    Sid, Aug 22, 2006
    #3
  4. Old HTML Slinger <> scripsit:

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

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Aug 22, 2006
    #4
  5. Old HTML Slinger

    Stan McCann Guest

    Old HTML Slinger<> wrote in
    news::

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

    --
    Stan McCann, RETIRED!!, "Uncle Pirate" http://stanmccann.us/
    Implementing negative score for googlegroup postings, see
    http://blinkynet.net/comp/uip5.html A zest for living must include a
    willingness to die. - R.A. Heinlein
     
    Stan McCann, Aug 22, 2006
    #5
  6. Old HTML Slinger

    Stan McCann Guest

    Sid <> wrote in
    news::

    > On Tue, 22 Aug 2006 06:31:47 GMT, Old HTML
    > Slinger<> wrote:
    >
    >: 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.

    --
    Stan McCann, RETIRED!!, "Uncle Pirate" http://stanmccann.us/
    Implementing negative score for googlegroup postings, see
    http://blinkynet.net/comp/uip5.html
    A zest for living must include a willingness to die. - R.A. Heinlein
     
    Stan McCann, Aug 22, 2006
    #6
  7. Old HTML Slinger

    Sid Guest

    On 22 Aug 2006 10:33:13 -0600, Stan McCann <> wrote:

    : > 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
     
    Sid, Aug 22, 2006
    #7
  8. Old HTML Slinger

    Toby Inkster Guest

    Old HTML Slinger wrote:

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

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Aug 22, 2006
    #8
  9. Old HTML Slinger

    dorayme Guest

    In article <>,
    Sid <> wrote:

    > On 22 Aug 2006 10:33:13 -0600, Stan McCann <> wrote:
    >
    > : > 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!

    --
    dorayme
     
    dorayme, Aug 22, 2006
    #9
  10. Old HTML Slinger

    dorayme Guest

    In article <gQFGg.9204$>,
    "Jukka K. Korpela" <> wrote:

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

    >
    > No you don't.


    You have evidence for this?

    --
    dorayme
     
    dorayme, Aug 22, 2006
    #10
  11. Old HTML Slinger

    Stan McCann Guest

    Sid <> wrote in
    news::

    > On 22 Aug 2006 10:33:13 -0600, Stan McCann <> wrote:
    >
    >: > 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.

    --
    Stan McCann, RETIRED!!, "Uncle Pirate" http://stanmccann.us/
    Implementing negative score for googlegroup postings, see
    http://blinkynet.net/comp/uip5.html
    A zest for living must include a willingness to die. - R.A. Heinlein
     
    Stan McCann, Aug 23, 2006
    #11
  12. Old HTML Slinger

    dorayme Guest

    In article <>,
    Old HTML Slinger<> wrote:

    > 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?


    <p>This sentence will have at least one its plain <span
    style="color:red;font-weight:bold;position:relative;bottom:0.4em;"
    >_____</span><span style="position:relative;right:2.9em;"> words

    struck thru with a bold line.</span></p>


    </runs off fast and hides>

    --
    dorayme
     
    dorayme, Aug 23, 2006
    #12
  13. On Mon, 21 Aug 2006 23:41:54 -0700, Leonard Blaisdell
    <> wrote:

    >In article <>,
    > Old HTML Slinger<> wrote:
    >
    >> 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.


    Thanks, but that'll also bold the text, which is not what I was
    looking to do.
     
    Old HTML Slinger, Aug 24, 2006
    #13
  14. On Wed, 23 Aug 2006 09:29:03 +1000, dorayme
    <> wrote:

    >In article <>,
    > Old HTML Slinger<> wrote:
    >
    >> 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?

    >
    ><p>This sentence will have at least one its plain <span
    >style="color:red;font-weight:bold;position:relative;bottom:0.4em;"
    >>_____</span><span style="position:relative;right:2.9em;"> words

    >struck thru with a bold line.</span></p>


    Well, it's struck through, and it's red, but it's the same width as
    the ordinary strikethrough line.
     
    Old HTML Slinger, Aug 24, 2006
    #14
  15. On Tue, 22 Aug 2006 18:58:12 +0300, "Jukka K. Korpela"
    <> wrote:

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

    >
    >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.
     
    Old HTML Slinger, Aug 24, 2006
    #15
  16. Old HTML Slinger

    dorayme Guest

    In article <>,
    Old HTML Slinger<> wrote:

    > On Wed, 23 Aug 2006 09:29:03 +1000, dorayme
    > <> wrote:
    >
    > >In article <>,
    > > Old HTML Slinger<> wrote:
    > >
    > >> 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?

    > >
    > ><p>This sentence will have at least one its plain <span
    > >style="color:red;font-weight:bold;position:relative;bottom:0.4em;"
    > >>_____</span><span style="position:relative;right:2.9em;"> words

    > >struck thru with a bold line.</span></p>

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

    --
    dorayme
     
    dorayme, Aug 24, 2006
    #16
  17. Old HTML Slinger

    Toby Inkster Guest

    Toby Inkster, Aug 24, 2006
    #17
  18. Toby Inkster wrote:
    > Old HTML Slinger wrote:
    >
    >> Any other ideas for getting that line thicker, more noticeable?

    >
    > This works nicely in Opera 9 and IE 6, but not quite as well in
    > Gecko-based browsers.
    >
    > http://examples.tobyinkster.co.uk/mystrike
    >

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

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Aug 24, 2006
    #18
  19. Jonathan N. Little wrote:
    > Toby Inkster wrote:
    >> Old HTML Slinger wrote:
    >>
    >>> Any other ideas for getting that line thicker, more noticeable?

    >>
    >> This works nicely in Opera 9 and IE 6, but not quite as well in
    >> Gecko-based browsers.
    >>
    >> http://examples.tobyinkster.co.uk/mystrike
    >>

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

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Aug 24, 2006
    #19
  20. dorayme <> scripsit:

    > In article <gQFGg.9204$>,
    > "Jukka K. Korpela" <> wrote:
    >
    >> Old HTML Slinger <> scripsit:
    >>
    >>> On rare occasions I need to show words or letters being crossed out.

    >>
    >> No you don't.

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

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Aug 24, 2006
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Furman

    {text-decoration: none} Broken

    Paul Furman, Feb 14, 2004, in forum: HTML
    Replies:
    11
    Views:
    791
    Mark Parnell
    Feb 15, 2004
  2. Desmond

    Text decoration

    Desmond, Aug 25, 2004, in forum: HTML
    Replies:
    21
    Views:
    1,007
  3. Klaas
    Replies:
    1
    Views:
    733
    Alessandro Zifiglio
    Aug 6, 2006
  4. Tim Streater

    text-decoration on part of a link

    Tim Streater, Sep 16, 2011, in forum: HTML
    Replies:
    24
    Views:
    1,624
    dorayme
    Sep 27, 2011
  5. Klaas

    Style="text-decoration: line-through"

    Klaas, Aug 6, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    177
    Alessandro Zifiglio
    Aug 6, 2006
Loading...

Share This Page