Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > Miscellaneous > Introduce Yourself

Notices

Reply
 
Thread Tools Search this Thread
Old 06-25-2011, 09:17 AM   #1
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
Hello/Image and text alignment

Hello. Sorry if I'm posting this in the wrong place, and if it's been dealt with umpteen times before, but I'm new to the forum.

I'm trying to align text with an image, so that the image appears on the left and the text vertically aligns with the center of the image. I have fiddled about with various methods, but to no avail. It would also be handy to have a solution that would work with .prc for Kindle and .epub files.

Any suggestions would be gratefully received.

Ta!
Derek R is offline   Reply With Quote
Old 06-25-2011, 10:13 AM   #2
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
vertical-align code

Maybe to make my meaning a little clearer I should provide the code I have tried:

p.noindent {text-indent:0em;}
p.traffic {text-indent:0em; font-size:140%;}
img.traffic {vertical-align:middle;}

<p class="traffic"><img class="traffic" src="Getting-Started-3.jpg" alt="" width="40" height="40" />Red Light Foods</p>
<p class="noindent">High GI and high calorie foods. Do not eat these if you want to lose weight.</p>
<p class="traffic"><img class="traffic" src="Getting-Started-4.jpg" alt="" width="40" height="40" />Yellow Light Foods</p>
<p class="noindent">Mid-range GI foods. Eat these when you have reached your target weight.</p>
<p class="traffic"><img class="traffic" src="Getting-Started-5.jpg" alt="" width="40" height="40" />Green Light Foods</p>
<p class="noindent">These are low GI, low in calories and low in saturated fat. Eat these if you want to lose weight. Low GI foods make you feel fuller for longer and reduce the craving for that fattening sugar fix.</p>

I am trying to get the text to align with the middle of the image, but the vertical-align isn't working in the Kindle Previewer. Am I making a fundamental mistake in the code, or does Kindle not support vertical align in css? If it doesn't, is there a simple fix to this?
Derek R is offline   Reply With Quote
 
Advertisement
Old 06-25-2011, 06:37 PM   #3
ImogenRose
PORTAL
ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.ImogenRose ought to be getting tired of karma fortunes by now.
 
ImogenRose's Avatar
 
Posts: 6,999
Karma: 2884640
Join Date: Apr 2010
Device: Kindle 1, Kindle 3 (3G), iPhone
Hello and welcome to MR!

Imogen
ImogenRose is offline   Reply With Quote
Old 06-26-2011, 11:47 AM   #4
Derek R
Connoisseur
Derek R began at the beginning.
 
Derek R's Avatar
 
Posts: 87
Karma: 20
Join Date: Jun 2011
Location: County Down, Northern Ireland
Device: none
Thank you! I'm going to need it!
Derek R is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-650 Text and alignment issues henders254 Sony Reader 0 05-14-2011 09:11 PM
Text Alignment Problem fan of kovid Conversion 15 03-20-2011 06:39 PM
Please help with RSS feed text alignment / justification zoilom Recipes 0 01-09-2011 01:23 PM
Text alignment James_Wilde iRiver Story 0 10-25-2010 05:22 AM
text and image pimpoum PDF 2 05-31-2009 05:26 AM


All times are GMT -4. The time now is 04:58 PM.


MobileRead.com is a privately owned, operated and funded community.