Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

column numbers of radio buttons in the mobile

  • modernity4r
  • modernity4r's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 1 week ago - 5 months 1 week ago #252199 by modernity4r
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.3.4+
Own server or LimeSurvey hosting: Both
Survey theme/template: vanilla
==================
I'm trying to display a long radio list in 2 columns. Unlike the desktop environment, it doesn't show as 2 columns on mobile phones.
```
@media (max-width: 770px) { #questionID .radio-list .col-md-6 { flex: 0 0 100%; max-width: 100%; } }
(recommended by chatGPT :))
```
Doesn't this work? Thank you in advance. 

File Attachment:

File Name: limesurvey...6542.lss
File Size:42 KB
Last edit: 5 months 1 week ago by modernity4r.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252232 by tpartner
Replied by tpartner on topic column numbers of radio buttons in the mobile
In the source of the question:

Code:
<style type="text/css">
 
   @media (max-width: 768px) { 
    #question{QID} .radio-list .col-md-6 {
      width: 50% !important; 
    } 
  }
</style>

(recommended by Tony :) )

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, modernity4r

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252233 by DenisChenu
Replied by DenisChenu on topic column numbers of radio buttons in the mobile

In the source of the question:
 
Do you think a addStyleToQuestion plugin can be interesting (like addScriptToQuestion ) ?
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: tpartner, modernity4r

Please Log in to join the conversation.

  • modernity4r
  • modernity4r's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 months 1 week ago - 5 months 1 week ago #252235 by modernity4r
Replied by modernity4r on topic column numbers of radio buttons in the mobile
width: 50% !important;
is worth: 100% !important;
```
Hi Tony,First and foremost, hats off to your coding savvy! Your solution not only hit the nail on the head but also proved that sometimes, the best answers come with a side of wit.I must admit, your 'recommended by Tony :)' sign-off was the cherry on top. It's like finding a hidden Easter egg in a video game – unexpected but totally delightful. It seems I've got some serious competition when it comes to tech advice with a twist!So here's to you, Tony – the maestro of media queries, the sultan of style tags, and the jester of JavaScript (too much? I'm still working on my tech humor). Your guidance is not just recommended but highly prized.Thanks a million! I'll be deploying this code with a little extra pep in my keystep, knowing it's got the Tony seal of approval.Cheers, chatGPT (by Jong-Hwa :))
Last edit: 5 months 1 week ago by modernity4r.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252240 by tpartner
Replied by tpartner on topic column numbers of radio buttons in the mobile

Do you think a addStyleToQuestion plugin can be interesting (like addScriptToQuestion ) ?

 
YES!

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252241 by tpartner
Replied by tpartner on topic column numbers of radio buttons in the mobile

...and the jester of JavaScript (too much?...
A little. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: modernity4r

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252248 by DenisChenu
Replied by DenisChenu on topic column numbers of radio buttons in the mobile

Do you think a addStyleToQuestion plugin can be interesting (like addScriptToQuestion ) ?


 
YES!

I create it, if you create a feature request to have it in core plugins : i create a PR too.
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: modernity4r

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252327 by tpartner
Replied by tpartner on topic column numbers of radio buttons in the mobile

I create it, if you create a feature request to have it in core plugins : i create a PR too.
Done - bugs.limesurvey.org/view.php?id=19244

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago - 5 months 1 week ago #252341 by DenisChenu
Replied by DenisChenu on topic column numbers of radio buttons in the mobile
I start the plugin ;)

But : i don't think of script tab, i think of css attribute

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 months 1 week ago by DenisChenu.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 1 week ago #252344 by tpartner
Replied by tpartner on topic column numbers of radio buttons in the mobile

But : i don't think of script tab, i think of css attribute
...or, that. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • modernity4r
  • modernity4r's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 months 3 weeks ago #254102 by modernity4r
Replied by modernity4r on topic column numbers of radio buttons in the mobile
When using the question editor to modify/add CSS, the 2 column array view works well on mobile phones. However, when viewing the response results in statistics, the added CSS appears stuck under the question text. Is there a way to make the CSS additions not visible in the statistics (simple/expert mode)?
Attachments:

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 months 3 weeks ago #254114 by Joffm
Hi,
add it to your "custom.css" with an additional class (here ".twoCols")
Code:
   @media (max-width: 768px) { 
    .twoCols #question{QID} .radio-list .col-md-6 {
      width: 50% !important; 
    } 
  }
Enter this css class name in the question settings "css classes"
 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: modernity4r

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose