
Tagged: timeline images
-
AuthorPosts
-
February 6, 2025 at 9:17 am #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
MichaelFebruary 8, 2025 at 1:44 pm #1476668Hey michaelf245,
I assume that this is what you have now with the image in the content box:
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:
Best regards,
MikeFebruary 8, 2025 at 8:45 pm #1476731Hi 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!
February 8, 2025 at 8:47 pm #1476733February 9, 2025 at 10:04 am #1476752This reply has been marked as private.February 9, 2025 at 3:41 pm #1476775Hi,
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,
MikeFebruary 10, 2025 at 10:56 am #1476816Thank you so much, that worked perfectly! :)
February 10, 2025 at 3:43 pm #1476829 -
AuthorPosts
- You must be logged in to reply to this topic.