|
|
Thread Tools | Search this Thread |
10-20-2012, 11:20 AM | #1 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
[SOLVED] Aligning text inside a <p> and an image <img> vertically (iBooks)
Hi all,
since I looked for this and did not find any solutions, I would like to share my solution, hoping it will save time and an headache to someone in the future. The problem I had the following piece of code: Code:
<p class="question"><img class="question" src="../Images/questionMark.jpg" alt="Domande utili da porsi" />Domande utili da porsi</p> Code:
img.question { vertical-align: middle; } Unfortunately, iBooks aligned the image and the text as if "text-bottom" was selected instead of "middle". (See attached iBooks.png). The solution Put the damn' image inside a <span> ! Code:
<p class="question"><span><img class="question" src="../Images/questionMark.jpg" alt="Domande utili da porsi" /></span>Domande utili da porsi</p> |
10-20-2012, 12:00 PM | #2 |
Digital Amanuensis
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
|
Oh, I forgot: I know that the expected result can be achieved with a table, but, for other reasons, I did not want to use tables.
Last edited by AlPe; 10-20-2012 at 12:03 PM. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to center an image vertically | GBAV | ePub | 31 | 08-01-2018 01:57 PM |
iBooks: Text overflowing image if it's at top of screen. | Oxford-eBooks | ePub | 30 | 05-10-2013 12:56 AM |
How to make TextView inside ViewPager scroll vertically | polygrimm | Android Developer's Corner | 0 | 07-03-2012 07:59 AM |
Right Aligning Wrapped Text Only | ghostyjack | ePub | 7 | 11-04-2010 08:54 AM |
Correctly Aligning Text Within a Table | ghostyjack | ePub | 3 | 07-28-2010 07:18 AM |