Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-08-2014, 01:06 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Image within a title: how to align?

Hi

It's a h title. For the time being, the image tag is within (maybe someone has a better solution).

I'd like to find a display that lower the Q on the joint image so as to fit the text of the title. I'm short on ideas (not an unusual situation )
Attached Thumbnails
Click image for larger version

Name:	image.png
Views:	270
Size:	12.0 KB
ID:	122725  

Last edited by roger64; 05-08-2014 at 01:08 AM.
roger64 is offline   Reply With Quote
Old 05-08-2014, 02:02 AM   #2
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
Crop your image to have no white space at the bottom or right side, preferably on top and left sides as well, put the image tag before the text inside the <h> tags and give it a style of display:inline

e.g.:
Quote:
<h1><img src="..Images/Image.jpeg" style="display:inline;"/>uelques mots...</h1>
odedta is offline   Reply With Quote
Advert
Old 05-08-2014, 03:44 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
If you want to align the baselines of text and image, that's going to be tricky. I think I tried with "position:relative;bottom:-x", but it didn't work with inline elements (and besides, finding the right value for x would be mostly trial and error). It may be easier if both image and text are in an SVG wrapper. Something I didn't try is putting only the image in an SVG wrapper, such that it "overflows" the viewbox...
Jellby is offline   Reply With Quote
Old 05-08-2014, 07:41 AM   #4
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,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by roger64 View Post
Hi

It's a h title. For the time being, the image tag is within (maybe someone has a better solution).

I'd like to find a display that lower the Q on the joint image so as to fit the text of the title. I'm short on ideas (not an unusual situation )
Please, post only the image of the "Q" and I think I can write something to get what you want (I hope to be right )
RbnJrg is offline   Reply With Quote
Old 05-08-2014, 08:18 AM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
hi

Thanks for your replies. Here is the image. It's an old book so the quality is just so-so and it hardly could be made an SVG.
Attached Thumbnails
Click image for larger version

Name:	Q.png
Views:	212
Size:	30.8 KB
ID:	122733  
roger64 is offline   Reply With Quote
Advert
Old 05-08-2014, 09:01 AM   #6
Doonge
Connoisseur
Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 1184732
Join Date: Nov 2013
Device: Kobo Glo
vertical-align property, within the image tag.

http://www.w3schools.com/cssref/pr_p...ical-align.asp
Doonge is offline   Reply With Quote
Old 05-08-2014, 10:18 AM   #7
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by Doonge View Post
vertical-align property, within the image tag.
Thank you. It's very easy this way with this code (seen with Calibre viewer):

Code:
<h2 id="toc1"><img alt="Image" src="../img-4.png" style="width:10%; vertical-align:-0.5em;"/>uelques mots…</h2>
I hope there are not any incompatibilities around.
Attached Thumbnails
Click image for larger version

Name:	Q2.png
Views:	205
Size:	7.6 KB
ID:	122746  
roger64 is offline   Reply With Quote
Old 05-08-2014, 10:52 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Surely you want your "alt" property to have the text "Q", don't you, not the word "Image"?
HarryT is offline   Reply With Quote
Old 05-08-2014, 12:12 PM   #9
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by roger64 View Post
I hope there are not any incompatibilities around.
I wouldn't be surprised if it didn't work in ADE...

But if you are going to use ems as offset, you better use ems to scale your image too.
Jellby is offline   Reply With Quote
Old 05-08-2014, 12:42 PM   #10
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,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by roger64 View Post
hi

Thanks for your replies. Here is the image. It's an old book so the quality is just so-so and it hardly could be made an SVG.
Hi Roger;

I found three methods to get what you want and all of them work in ADE

In the .css stylesheet I have:

Code:
h1 {
   font-size: 1.6em;
}

.base {
   width: 100px;
   height: auto;
}

.method1 {
   vertical-align: -15px;  /* VERTICAL ALIGN METHOD */
}

.method2 {
   margin-bottom: -15px;  /* MARGIN-BOTTOM METHOD */
}

.method3 {
   float: left; /* FLOAT METHOD */
}

.down1 {
   margin-top: 92px;
}
And in the .xhtml file:

Code:
  <h1><img alt="Q" class="base method1" src="../Images/Q.png" />uod erat demonstrandum - Method 1</h1>

  <h1><img alt="Q" class="base method2" src="../Images/Q.png" />uod erat demonstrandum - Method 2</h1>

  <p><img alt="Q" class="base method3" src="../Images/Q.png" /></p>

  <h1 class="down1">uod erat demonstrandum - Method 3</h1>
Here you can see a screenshot of my ADE:

Click image for larger version

Name:	Image1.png
Views:	227
Size:	63.2 KB
ID:	122752

It works with ANY ADE FONT SIZE Below you can check the respective epub.

Regards
Rubén
Attached Files
File Type: epub Q raised cap.epub (16.4 KB, 203 views)

Last edited by RbnJrg; 05-08-2014 at 12:45 PM.
RbnJrg is offline   Reply With Quote
Old 05-08-2014, 04:39 PM   #11
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

Thank you all for your comments and your kind help. I've settled on the "vertical-align" method but others methods are indeed very OK too. I will dutifully replace "image" in the Alt field with "Q", and express everything in em.
roger64 is offline   Reply With Quote
Old 05-08-2014, 06:04 PM   #12
Doonge
Connoisseur
Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.Doonge ought to be getting tired of karma fortunes by now.
 
Posts: 80
Karma: 1184732
Join Date: Nov 2013
Device: Kobo Glo
Since the image has fixed dimensions, and considering what you want is adjusting the baseline of the Q image, you are better off using px not em for the image style. The dimension of your image is not em dependent.

Consider also additionnal styling in the case the image can't be rendered (and the alt text "Q" is used instead). You might want the "Q" text to be stylised more or less similarly to the image.

I'm not sure it is useful to set a width to the image? Or am I wrong and your image has a variable size and that's your aim?
Doonge is offline   Reply With Quote
Old 05-08-2014, 08:40 PM   #13
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,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by roger64 View Post
Hi

Thank you all for your comments and your kind help. I've settled on the "vertical-align" method but others methods are indeed very OK too. I will dutifully replace "image" in the Alt field with "Q", and express everything in em.
Hi Roger;

I'm not sure that expressing all in "em" is the best choice in this case. As you could see, in my solutions I used "px" with image size and "px" with vertical-align, margin-bottom and float methods. In your solution, you expressed the image size as percentage (in this case, 10%). But doing of that way, the image size will be always 10% of the "screen width" (no matter the font-size) meanwhile the text, expressed in "em" will vary and I'm not sure that the "bottom align" will remain.
RbnJrg is offline   Reply With Quote
Old 05-08-2014, 08:42 PM   #14
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,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Doonge View Post
Since the image has fixed dimensions, and considering what you want is adjusting the baseline of the Q image, you are better off using px not em for the image style. The dimension of your image is not em dependent.
Exactly! For that reason I used "px" in my aproximations.
RbnJrg is offline   Reply With Quote
Old 05-09-2014, 03:14 AM   #15
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Doonge View Post
The dimension of your image is not em dependent.
Maybe it should be, or you can end up with a Q that's smaller that the text
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Joining image and title roger64 ePub 11 12-03-2012 11:27 AM
Centered but left align? mtrahan ePub 15 04-01-2012 03:56 PM
need help on how to align a table to the right NASCARaddicted ePub 6 02-18-2011 01:46 PM
I can not align the text...help please! XD derfel_spain ePub 17 12-18-2010 09:45 AM
Justify align in RTF? griffbrad Sony Reader 6 11-27-2006 03:25 PM


All times are GMT -4. The time now is 05:36 AM.


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