Exporting two anchored images in the same paragraph

Learn / Forums / EPUB and eBook / Exporting two anchored images in the same paragraph

Viewing 3 reply threads
  • Author
    Posts
    • #81727

      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?

    • #81936

      As a follow up, my workaround was to split the long paragraph and anchor one image to each paragraph.

    • #82239
      Aaron Troia
      Participant

      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

    • #82241

      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.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
>