# Responsive Horizontal Columns

**URL:** <https://community.gravityforms.com/t/responsive-horizontal-columns/11572>\
**Category:** Get Help\
**Tags:** css, mobile, responsive, columns\
**Created:** [January 9, 2022, 5:39pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572 "2022-01-09T17:39:22Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 9, 2022, 5:39pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/1 "2022-01-09T17:39:22Z")

</div>

I wondered is it is possible to have lets say

single radio button field with images associated x 4 side by side using the excellent facility within the editor.

Below shows what is displayed in desktop. Just test data.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/c/cf41b9ea22f248bb29797a713ee982cea0ffd66e.png)

I would like when in mobile for the image to show in says 2 columns. At the moment when going down to mobile resolution it just aligns them all left and a single column.

Even If I have to compromise and have 2 on desktop and mobile it would be fine. I’m more asking hwo we go about getting two columns in mobile. Ideally as well having the image and radio button aligned center to the field.

Ideas would be appreciated thanks.

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 11, 2022, 7:06am UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/2 "2022-01-11T07:06:50Z")

</div>

Any ideas on this @user5c0166073a6c48.6 you seem to be the resident css wiz.

Essentially it would be great to have

Desktop (Column of 4 items)  
Mobile Column of 2 items.

Or at least Mobile a single column with everything centre aligned vertical and horizontal for the checkboxes. Ideally by a custom css rule.

---

<div class="post-metadata">

**Author:** ![user5c0166073a6c48.6](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5c0166073a6c48.6/32/17391_2.png) [@user5c0166073a6c48.6](https://community.gravityforms.com/u/user5c0166073a6c48.6)\
**Post date:** [January 11, 2022, 2:50pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/3 "2022-01-11T14:50:44Z")

</div>

@Adey yes this is possible. Would you mind sharing a URL for what you have already?

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 11, 2022, 3:12pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/4 "2022-01-11T15:12:37Z")

</div>

Sorry its a local dev site Ric. And many thanks for responding.

My ideal world is

Desktop

Checkbox1 - Checkbox2 - Checkbox3 - Checkbox4

Mobile

Checkbox1 - Checkbox2  
Checkbox3- Checkbox4

Ideally centre aligning the check box and text description in mobile resolution.

Just to add - These are individual checkbox fields with a single tickbox option.

---

<div class="post-metadata">

**Author:** ![user5c0166073a6c48.6](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5c0166073a6c48.6/32/17391_2.png) [@user5c0166073a6c48.6](https://community.gravityforms.com/u/user5c0166073a6c48.6)\
**Post date:** [January 11, 2022, 4:09pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/5 "2022-01-11T16:09:00Z")

</div>

As in each field has one checkbox? Off the bat why not use radio buttons instead?

Or have each option inside one checkbox field?

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 11, 2022, 4:27pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/6 "2022-01-11T16:27:42Z")

</div>

I could have multiple but its easier and more convenient with individual checkboxes. Plus the conditional logic can be changed on a single field easier when the form goes live.

You cant de-tick a radio button can you? Thats the only reason I picked a check box Ric.

---

<div class="post-metadata">

**Author:** ![user5c0166073a6c48.6](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5c0166073a6c48.6/32/17391_2.png) [@user5c0166073a6c48.6](https://community.gravityforms.com/u/user5c0166073a6c48.6)\
**Post date:** [January 12, 2022, 12:38am UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/7 "2022-01-12T00:38:26Z")

</div>

You can detick a radio button by clicking another option.

With your use case, are visitors able to select more than one option? Or should they only be able to select one option?

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 12, 2022, 8:55am UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/8 "2022-01-12T08:55:15Z")

</div>

Thanks Ric.

Each Washing machine is a separate field / checkbox with a single entry. The user has to option to choose 1 or many items.

This may be a unorthodox but works for me in this scenario, I’m bending the rules of gravity but it works and looks good. This being an inventory form. Each item will be different in final form. I just duplicated for simplicity.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/1/17f86bbd7cf874a1fdd92f89ca668784214190e7.png)

I have managed to get this on desktop

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/c/c405d4fc87fc99c92d158859396223084e4ac1d3.png)

And this on mobile

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/3/36c847e3c40205c0f3efe69426f6b1eb1f5564a1.png)

Ideally I would like

WM1 - WM2  
WM3 - WM4

When reduced to mobile size.

---

<div class="post-metadata">

**Author:** ![user5c0166073a6c48.6](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5c0166073a6c48.6/32/17391_2.png) [@user5c0166073a6c48.6](https://community.gravityforms.com/u/user5c0166073a6c48.6)\
**Post date:** [January 12, 2022, 2:04pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/9 "2022-01-12T14:04:44Z")

</div>

Do all the the checkbox options show on page load? You mentioned you have some conditional logic applied to some of them.

I can write some css targeting the checkbox fields so they appear the way you’re wanting but if some of the checkbox fields aren’t visible on page load it might effect the layout. Can you confirm?

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 12, 2022, 2:35pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/10 "2022-01-12T14:35:09Z")

</div>

No conditional logic on load Ric. Its vanilla at the moment. By conditional logic I meant given a dropdown etc further down the form it may for instance hide one of the checkboxes. This may or may not be required. Its driven really by what we come up with.

---

<div class="post-metadata">

**Author:** ![user5c0166073a6c48.6](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5c0166073a6c48.6/32/17391_2.png) [@user5c0166073a6c48.6](https://community.gravityforms.com/u/user5c0166073a6c48.6)\
**Post date:** [January 13, 2022, 4:23am UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/11 "2022-01-13T04:23:41Z")

</div>

Set your checkboxes inside the same row in the editor like this:

 ![Screen Shot 2022-01-12 at 10.18.39 PM](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/5/5867932dcd8fa20bdc02fbad28d8f4473c01137f.png)

Then add the CSS below:

```auto
@media only screen and (max-width: 675px) {
.gform_wrapper.gravity-theme .gfield.gfield--width-quarter {
    grid-column: span 6 !important;
  }
}

```

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 13, 2022, 8:13am UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/12 "2022-01-13T08:13:45Z")

</div>

hmm not working for me. No change at all. Did change to max width 400px but tried 0 and still didn’t work.

Video below - shows in preview mode for gravity but also tried on the page with theme css applied

[https://wormhole.app/de1L1#hElq7Uth9TEaXPPt\_wH0lg](https://wormhole.app/de1L1#hElq7Uth9TEaXPPt_wH0lg)

---

<div class="post-metadata">

**Author:** ![user5c0166073a6c48.6](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5c0166073a6c48.6/32/17391_2.png) [@user5c0166073a6c48.6](https://community.gravityforms.com/u/user5c0166073a6c48.6)\
**Post date:** [January 13, 2022, 3:13pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/13 "2022-01-13T15:13:33Z")

</div>

Can you open the page with Google developer tools and click the mobile breakpoint? Resizing your window is not always reliable.

If the CSS is not adjusting the mobile columns the try adjusting the 6. You could try 3 or another number until you get the expected output?

Also, can you add the CSS to your customizer \> additional CSS tab?

---

<div class="post-metadata">

**Author:** ![Adey](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/adey/32/4126_2.png) [@Adey](https://community.gravityforms.com/u/Adey)\
**Post date:** [January 13, 2022, 3:45pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/14 "2022-01-13T15:45:41Z")

</div>

Adding it to the additional css worked a treat Ric. Thanks. Didn’t work on the main style sheet but did on the additional. Strange that as I have other things working in the main style sheet for gravity.

**Icing on the cake here.**

_Any idea how I get_

A/ The items aligned horizontally. They are shifted to the left at the moment. Having equal space left and right (including the check box) would be great. Even better the checkbox below the image and the description below the check box. Then all aligned vertically and horizontally. Really know I’m pushing luck now but you may have the answer in a few lines.

![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/2/269ad32b323e54bc18c6a6c6f9954704f51ac009.png)

B/ The tick box say double the size. Its very small by default and making it a bit more prominent would be nice.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/7/7440a8f9cda10adbaf1a9df118f39f50bfdcbc0d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [February 12, 2022, 3:45pm UTC](https://community.gravityforms.com/t/responsive-horizontal-columns/11572/15 "2022-02-12T15:45:43Z")

</div>

Closed on February 12, 2022, 3:45pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
