View Single Post
Old 05-19-2020, 02:45 PM   #15
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,834
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Ok, the OP wanted a solution for .KFX and here there is a solution for .KFX (not for ADE, not for .kf7).

1. In the .xhtml file:

Code:
  <p>This is the lengthy prayer that will be followed by a versicle and response. It is flush left because I did not set a hanging indent.</p>

  <p class="hanging_tag">V.</p>

  <p class="versicle">This is the versicle. Observe how, apart from the V. tag, the left margin is flush. In Microsoft Word, this is achieved by setting a hanging indent, typing "V.", and then pressing "tab."</p>

  <p class="hanging_tag italic">R.</p>

  <p class="versicle italic">This is the response. It, too, has a flush left margin.</p>

  <p>This is another lengthy prayer that will be followed by a versicle and response. It is flush left because I did not set a hanging indent.</p>
2. In the .css stylesheet:

Code:
p {
   text-indent: 0;
   text-align: justify;
   margin-bottom: 0;
}

.italic {
   font-style: italic;
}

.hanging_tag {
    float: left;
    display: inline;
    text-align: left;
    width: 1.5em;
}

.versicle {
    display: block;
    padding-left: 18%;
    text-align: left;
    width: 81%;
}
This code works fine both, in portrait and lanscape mode, except with font size "10" in portrait mode (but is difficult to think that somebody wants to read with such font size). Also with smartphones and font-size "9" or "10" (again, those are huge font-size to read in a smartphone; I think nobody will use those sizes to read in a phone) it can be some issues with the alignment.
In landscape mode all seems to be ok. Below I attach the respective epub (by the way, .KFX has some serious issues with the property "float" —but not with the present aproximation—, that property works much better in .kf8).

Rubén
Attached Files
File Type: epub Hanging text Bis.epub (2.3 KB, 360 views)
RbnJrg is offline   Reply With Quote