Welcome to the LimeSurvey Community Forum

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

set box text input width for other

More
5 years 8 months ago #171791 by terryaulenbach
Replied by terryaulenbach on topic set box text input width for other
Thank you very much. This is exactly what I needed.
The topic has been locked.
More
5 years 8 months ago #171792 by terryaulenbach
Replied by terryaulenbach on topic set box text input width for other
Thanks, Tony, but Joffm answered my question.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago - 5 years 8 months ago #171822 by tpartner
Replied by tpartner on topic set box text input width for other
My solution would be to assign a CSS class to the question and place the style rules in your custom.css file so they are in the <head> element rather than the <body>.

Although, in HTML5, placing styles in the <body> is valid, it will force the browser to re-render the page as it loads. This causes an extra load on the browser and may be visible to the user. As a result, I try to avoid styles in the <body> element.

1) Assign a CSS class to the question something like "input-width-500".

2) Place something like this in custom.css:

Code:
.input-width-500 input[type="text"].form-control {
    width: 500px;
}
 
@media (max-width: 768px) {
  .input-width-500 input[type="text"].form-control {
    width: auto;
  }
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 8 months ago by tpartner.
The topic has been locked.
More
5 years 8 months ago #171835 by terryaulenbach
Replied by terryaulenbach on topic set box text input width for other
Thanks, Tony! I will try this way as well. It's kind of what I was going for but couldn't quite figure out.
The topic has been locked.
More
5 years 3 months ago #179398 by MackFord
Replied by MackFord on topic set box text input width for other
Thanks a lot of you for your help!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose