# Keep Columns Horizontally side by side on Mobile Devices

> Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…

Source: https://tadabase.com/docs/snippets/keep-columns-horizontally-side-by-side-on-mobile-devices  
Status: Not yet re-checked. Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

> **Warning:** Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add this functionality is through the plugin installation wizard. Learn more about plugins [here](https://tadabase.com/docs).

![Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/d525c353210a78e8152604c5670c3ed7bc623833_2_1035x688.png)

**Step 1**

**In each column, add the CSS class of "small-screen-column."**

![Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-16_09-33-14.png)

**Step 2**

**Get the component ID by hovering over the info icon.**

![Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-16_09-43-24.png)

**Step 3**

**Add the following code to the JavaScript tab of the page.**

```
TB.render('component_ID', function(data) {
    data.ele.find('.small-screen-column').parent().parent().each(function() {
        var classList = this.className.split(/\s+/);
        for (var i = 0; i < classList.length; i++) {
            if (classList[i].contains('col-md')) {
                $(this).addClass(classList[i].replace('md', 'xs'));
            }
        }
    });
});
```

> **Note:** Remember to change the "component_ID" of the code to your component ID.

![Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”](https://tadabase-docs-assets.s3.amazonaws.com/uploads/images/gallery/2022-09/scaled-1680-/2022-09-16_09-47-20.png)

**Original Community Post:**

[Keep columns horizontally side by side on Mobile devices - Community Discussions / Tips and Tricks - Tadabase Community](https://community.tadabase.io/t/keep-columns-horizontally-side-by-side-on-mobile-devices/1610)
