View Single Post
Old 08-25-2025, 10:20 PM   #7
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
Quote:
Originally Posted by ElMiko View Post
EDIT: looks like pseudo-elements are only sporadically supported by epub2... boo.
There are epub2 ereaders that honor pseudo-elements, ie., KOReader. And all epub3 ereaders will support an epub2 with pseudo-elements. But if you want something that works everywhere, although is not optimal, you can try the following approximation, which centers the block, aligns the text to the left, and does not depend on any "a priori" width:

Code:
  <div class="bigWrapper">
    <div class="wrapper">
      <p class="col1"><img alt="" src="../Images/your_image.png"/>LOREM<br/>IPSUM DOLOR SIT AMET, CONSEC</p>
    </div>
  </div>
Code:
.bigWrapper {
  text-align: center;
}

.wrapper {
  display: inline-block;
}

.col1 {
  text-align: left;
}

.col1 img {
  display: block;
  float: left;
  width: 3em; /* This must be changed according to your image */
  height: 3em; /* This must be changed according to your image */
  margin: 0 5px 0 0;
}
As I said, it's not the best but it still works in ADE 2.0.

Last edited by RbnJrg; 08-25-2025 at 10:23 PM.
RbnJrg is offline   Reply With Quote