-
AuthorPosts
-
January 14, 2023 at 9:17 pm #1378704
My blog page looks great on desktop but it is not responsive for mobile
https://alexandere103.sg-host.com/blog/Please assist.
Thanks
January 15, 2023 at 9:14 am #1378731have a look to this post:
https://kriesi.at/support/topic/dynamically-change-number-of-columns-in-post-slider/#post-1377717this is similar for your blog
to stay specific only to this page ( your blog page ) we can try to set the conditional tag is_archive
(if it does not work with this conditional we had to find a better conditional)
this to your child-theme functions.php:function wrap_articles_in_one_flex_container(){ if(is_archive()){ ?> <script type="text/javascript"> window.addEventListener("DOMContentLoaded", function () { (function($) { $('.avia-content-slider-inner .slide-entry-wrap .slide-entry').each( function() { $(this).detach().appendTo('.avia-content-slider-inner .slide-entry-wrap:first'); }); $('.avia-content-slider-inner .slide-entry-wrap:empty').remove(); })(jQuery); }); </script> <?php } } add_action('wp_footer', 'wrap_articles_in_one_flex_container');
this collects all articles into one wrapper – only this way it is possible that the whole container can react responsively.
now the css to quick css:#top.category-blog .avia-content-slider .slide-entry-wrap { display: flex; flex-flow: row wrap; justify-content: space-between; } #top.category-blog .avia-content-slider .slide-entry-wrap .slide-entry { flex: 0 1 calc(33% - 30px); margin: 0 15px 30px; width: unset; max-width: unset; } @media only screen and (max-width:989px) { #top.category-blog .avia-content-slider .slide-entry-wrap .slide-entry { flex: 0 1 calc(50% - 10px); margin: 0 0 30px !important; } } @media only screen and (max-width:767px) { #top.category-blog .avia-content-slider .slide-entry-wrap .slide-entry { flex: 1 1 100%; margin: 0 0 30px !important; } }
But you had to switch off the pagination
January 23, 2023 at 8:36 pm #1394843For the unbelievers among us ;)
you can also test something like this in the developer tools of the browser. The script (pure without php part) is entered via the console – new CSS instructions can then also be tested in the simulation.January 24, 2023 at 10:29 am #1394894 -
AuthorPosts
- You must be logged in to reply to this topic.