View Single Post
Old 08-13-2022, 11:04 AM   #30
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,857
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
A workaround

You could try something like the following:

1) In your .xhtml code:

Code:
<p>This is a test<span class="lineThrought"></span> to simulate line-throught style</p>
2) In your .css stylesheet:

Code:
.lineThrought {
    display: inline-block; /* This is key */
    width: 1.4em; /* You must adapt the value according to the text to be strikethrough */
    margin-left: -1.4em; /* This is linked with the above value */
    margin-bottom: 0.15em; /* This is linked with the font-size */
    border-bottom: 3px solid black; /* Use here the width of you wish */
}
Of course, by using the above code, you'll need a different style for any word to be strikethrough. So, you could use a variant:

1) In your .xhtml code:

Code:
<p>This is a test<span class="lineThrought recoll1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> to simulate line-throught style</p>
2) In your .css stylesheet:

Code:
.lineThrought {
    display: inline-block; /* This is key */
    line-height: 0; /* This is key; now you don't use margin-bottom */
    border-bottom: 3px solid black; /* Use here the width of you wish */
}

.recoll1 {
    margin-left: -1.4em; /* This is linked with the width of the strikethrough word */
}
With this last variant you'll need only to use several .recollX styles.

And the workaround looks fine.

Click image for larger version

Name:	Screenshot1.png
Views:	112
Size:	18.6 KB
ID:	195844
RbnJrg is offline   Reply With Quote