BigCommerce Page Builder Hack: Separate Mobile and Desktop Layouts

Desktop mobile

Written by

in

BigCommerce Page Builder does not provide a true separate layout builder for desktop and mobile pages. Instead, it uses responsive Stencil themes, where a single layout automatically adapts across all screen sizes.

You design one layout, and CSS controls how it responds on mobile, tablet, and desktop.

However, with a small CSS trick, you can simulate separate desktop and mobile layouts for sliders, banners, or widgets by conditionally showing or hiding elements based on screen width.

This makes it possible to create different experiences per device, even though BigCommerce itself is designed around a single responsive layout system.

<style> 
div[data-content-region] div[data-layout-name="desktop"] {
  display: none;
}
div[data-content-region] div[data-layout-name="mobile"] {
  display: block;
}
@media (min-width: 801px) {
  div[data-content-region] div[data-layout-name="desktop"] {
     display: block;
  }
  div[data-content-region] div[data-layout-name="mobile"] {
    display:none;
  }
}
</style>