G
G
globus8122017-11-10 14:50:28
Mobile development
globus812, 2017-11-10 14:50:28

No horizontal scroll in browser window in Storefront theme (Wordpress + Woocommerce), how to get it back?

Wordpress + Woocommerce. The mobile version of the Storefront theme does not have horizontal scrolling in the browser window. Therefore, large tables cannot be read. Does anyone know how to get it back?
Installing in a child theme

body {
overflow-x: auto; 
}

doesn't help, neither does overflow-x: scroll;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
globus812, 2017-12-04
@globus812

Thanks, Alexey Karagodnikov , for the hint in the comments! The issue was resolved by wrapping all the tables with a div in my js script file:

var $ = jQuery.noConflict();
$(document).ready(function () {
  $('table').wrap('<div class="tablescroll"></div>');
});

and adding the "tablescroll" class to the css style file:
.tablescroll {
  max-width:100%;
  overflow-x: auto;
  min-width:240px;
  -webkit-overflow-scrolling: touch;
  }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question