-
AuthorPosts
-
May 15, 2017 at 12:12 am #793137
Hi!
I am trying to make all single product pages NOT responsive, is it possible ?
Can I achieve it with CSS ?Thank you for your answer,
M.
May 15, 2017 at 7:51 am #793175Hey Vrout,
You can force the body to have a minimum width, for starters. Please try this in CSS:
.single-product { min-width: 1024px !important; }
If you need additional help, please give us the URL of the website in question.
Best regards,
SarahMay 15, 2017 at 8:31 pm #793485May 16, 2017 at 5:23 am #793703Hi,
Thanks for the instructions, I’m not sure if I understand the problem though, could you post a screenshot of it please? You can upload to a service like google drive or dropbox and then link to it here.
Best regards,
RikardMay 16, 2017 at 9:35 am #793771May 16, 2017 at 1:34 pm #793914Hi Vrout,
That’s the point in responsive! To adjust the layout in such way that it looks good on other screen sizes and can be used as it should, easily, without any extra scrolling. Let us know what you think?
Best regards,
VictoriaMay 16, 2017 at 3:35 pm #794014Hi Victoria,
Thank your for your answer.
I’m sorry, I don’t really understand your message since, as you can see on the screenshot, the responsive mode takes up more space than no-responsive mode. But space is not really the problem here.
To make it more clear, I am trying to make the “Step 3” (Etape 3) not responsive so that it displays well on all my single product pages, would it be possible with some CSS ?
Or is there another solution I could try?Thanks a lot for your kind help,
M.May 16, 2017 at 8:07 pm #794393Hi,
I would not deactivate responsiveness and instead try to find some custom code which works well on smaller screen sizes. If you want our help with this, then we need your website in responsive mode, so we can find a workaround for you.
Best regards,
AndyMay 17, 2017 at 11:12 am #794779Hi Andy,
Thanks, the website is now in responsive mode.
If you can help me on this it would be much appreciated…
Thank you again,
M.
May 19, 2017 at 7:01 am #796365Hi,
Please try this script in the functions.php file:
function ava_custom_script_mod(){ ?> <script> (function($){ function a() { var isMobile = ''; if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement) { isMobile = true; } else { isMobile = false; } if(!isMobile || window.innerWidth > 1024) return; var product = $('body').hasClass('single-product'); if(product) { $('html').removeClass('responsive').addClass('fixed_layout'); } } a(); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_mod');
Best regards,
IsmaelMay 22, 2017 at 10:19 pm #797939Hi Ismael,
Thanks a lot for this script !
It does display better on mobile now thank you, I only have two little problems now :
– This scripts seems to apply to computers (with large screen size), is it possible to only apply this script to mobile/tablets ?
– How can I set the size of the “fixed layout” (mentioned in the script) please? I want to make it bigger if possible.(Sorry I took some time to answer because I updated the theme to last version to see if it could help with my problem.)
Thanks again,
May 23, 2017 at 6:33 am #798071 -
AuthorPosts
- You must be logged in to reply to this topic.