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

More
1 year 9 months ago - 1 year 9 months 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.3 KB
Last edit: 1 year 9 months ago by modernity4r.

Please Log in to join the conversation.

More
1 year 9 months ago #252232 by tpartner
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.

More
1 year 9 months ago #252233 by DenisChenu

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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner, modernity4r

Please Log in to join the conversation.

More
1 year 9 months ago - 1 year 9 months ago #252235 by modernity4r
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: 1 year 9 months ago by modernity4r.

Please Log in to join the conversation.

More
1 year 9 months ago #252240 by tpartner

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.

More
1 year 9 months ago #252241 by tpartner

...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.

More
1 year 9 months ago #252248 by DenisChenu

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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: modernity4r

Please Log in to join the conversation.

More
1 year 9 months ago #252327 by tpartner

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.

More
1 year 9 months ago - 1 year 9 months ago #252341 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
Last edit: 1 year 9 months ago by DenisChenu.

Please Log in to join the conversation.

More
1 year 9 months ago #252344 by tpartner

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.

More
1 year 7 months ago #254102 by modernity4r
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)?

Please Log in to join the conversation.

More
1 year 7 months 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.

More
1 year 7 months ago #254121 by tpartner
Or, place the CSS in the source of the question help.

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.

More
1 year 7 months ago #254139 by modernity4r
Thank you. As you suggested, placing the CSS in the question help source is also a good method. I will try to apply the advice you have given well. For reference, removing the question mark icon (FontAwesome) related code from the theme.css file will modify the help icon to not be unnecessarily shown by itself.

Please Log in to join the conversation.

More
1 year 7 months ago #254140 by modernity4r
Thank you. I was trying to edit the CSS per individual question without modifying the theme's custom.css file as much as possible, but I should make edits (customizations) to the custom.css file for the design of individual surveys.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose