- Posts: 37
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
set box text input width for other
- terryaulenbach
- Offline
- Junior Member
Less
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.
- terryaulenbach
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 1
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
5 years 8 months ago - 5 years 8 months ago #171822
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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:
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.
- terryaulenbach
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 1
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.
- MackFord
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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.