Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1476489

    Dear team Kriesi,

    I set up a page with a timeline and set the options to box with shadow. There, I would like to add an image on the right side of the text. In the editor all I can do is adding images within the text box but not on the right side.

    Any advice appreciated.

    Thanks
    Michael

    #1476668

    Hey michaelf245,
    I assume that this is what you have now with the image in the content box:
    Screen Shot 2025 02 08 at 7.43.12 AM
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_script() { ?>
      <script>
    $(document).ready(function() {
      $('.av-milestone').each(function() {
        var image = $(this).find('img');
        var content = $(this).find('.av-milestone-content-wrap');
        content.after(image);
        $(this).css('display', 'flex');
        image.css('margin-left', '20px');
      });
    });
    </script>
      <?php
    }
    add_action( 'wp_footer', 'custom_script', 99 );

    and this css in your quick css:

    .avia-timeline-vertical.av-milestone-placement-left .av-milestone-content-wrap {
        width: 50%;
    }
    .avia-timeline-vertical .av-milestone-content-wrap {
        padding: 0px 0px 30px 60px;
    }
    .avia-timeline-vertical .av-milestone-icon-wrap {
        padding: 0px 0 30px 0;    width: 90px;
    }
    html .av-milestone :where(img[class*=wp-image-]) {
        height: 180px;
    }
    .avia-timeline-vertical .av-milestone-date {
        padding: 30px 60px 0 0;
    }

    My images are 180px, so you may need to adjust the css to suit.
    result:
    Screen Shot 2025 02 08 at 7.38.29 AM

    Best regards,
    Mike

    #1476731

    Hi Mike,

    thanks for your reply. My timeline looks exactly like in image 1. And the final result should look exactly like in image 2. However, I added both codes and it still looks like in image 1. Maybe you have some other advies?

    Thank in advance!

    #1476733

    Hi,
    We will need to see your page.

    Best regards,
    Mike

    #1476752
    This reply has been marked as private.
    #1476775

    Hi,
    I made an adjustment so now the image is on the right side, but your titles are too large and long, so I added this css to brake your text so the element lines up good:

    .avia-timeline h2.av-milestone-date>strong {
    	width: 200px;
    	font-size: 20px !important;
    	overflow-wrap: break-word;
      word-wrap: break-word;
      -ms-word-break: break-all;
      word-break: break-all;
      word-break: break-word;
      -ms-hyphens: auto;
      -moz-hyphens: auto;
      -webkit-hyphens: auto;
      hyphens: auto;
    }

    you can adjust the font size and width to suit, but there is not a lot of options.
    You may try making the page width 100% with this css:

    .responsive #top.page-id-19 #after_tab_section_1 .container {
    	max-width: 100%;
    }

    and then make the font size and width larger to suit.

    Best regards,
    Mike

    #1476816

    Thank you so much, that worked perfectly! :)

    #1476829

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.