Exporting two anchored images in the same paragraph
Learn / Forums / EPUB and eBook / Exporting two anchored images in the same paragraph
- This topic has 3 replies, 2 voices, and was last updated 8 years, 1 month ago by Gustavo Martinez.
-
AuthorPosts
-
-
February 9, 2016 at 7:47 pm #81727Gustavo MartinezMember
Is it possible to keep the position of two anchored images in one paragraph when exporting to epub? I have a long paragraph with two anchored images. One is towards the left margin and the other one (a few lines below) towards to right margin. I haven’t been able to keep both in the same paragraph when exported to epub. Just the first one using Float left. Applying Float right to the second one doesn’t have any effect; the image moves to the bottom of the paragraph. Any ideas how to get both in the same paragraph or it’s just not possible?
-
February 12, 2016 at 2:03 pm #81936Gustavo MartinezMember
As a follow up, my workaround was to split the long paragraph and anchor one image to each paragraph.
-
February 24, 2016 at 4:02 pm #82239Aaron TroiaParticipant
That’s a good question. Off the top of my head, in the code after export, you might be able to do this with a double div wrapping the paragraph. You might make sure that the CSS isnt using the clear property, that could bump an image down.
As a rule of thumb and to keep my stress level down, I usually try and only do one floated object per paragraph, usually. Having 2+ floated images can cause a problem in smaller screens where the images take up most of or all of the screen, I tend think it’s safer to keep them to one side of the screen or the other (so either on the left or right). That doesn’t mean I haven’t done books were alternating paragraphs had alternating left/right floats, but gets tricky when you have multiple floats in one paragraph.
Anyway, glad you found a workaround.
Aaron
-
February 24, 2016 at 6:07 pm #82241Gustavo MartinezMember
Thanks for the feedback. I tend to agree with not messing up with two floated images in one paragraph because it causes havoc with small screens. I saw it when testing the epub in small devices. I ended up using fixed layout because there were too many images to deal with. It looks great on desktop screens (using Readium for Windows and Ibooks for Macs). Still trying to figure out the best for Androids. So far, Gitden Reader produces the best results.
-
-
AuthorPosts
- You must be logged in to reply to this topic.