How to left-align numerical input questions/answers

More
4 years 6 days ago #169023 by Skowronski
Hey there,
I have a numerical input question in my survey (asking for the age of participants).
The answer field is right-aligned, but I would like to left-align it.

Is there a way to do so?

Thanks!
Marika
The following user(s) said Thank You: JamesHarrisHKI
The topic has been locked.
More
4 years 6 days ago #169030 by tpartner
LimeSurvey version?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
4 years 6 days ago #169037 by Skowronski
Version 3.7.1+180424
The topic has been locked.
More
4 years 6 days ago #169055 by tpartner
To left-align all numeric inputs, add this to the end of custom.css:

.numeric-item input[data-number='1'] {
    text-align: left;
}

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, JamesHarrisHKI, skywalker23
The topic has been locked.
More
4 years 6 days ago #169056 by Skowronski
Thanks, that worked!
The topic has been locked.
More
2 years 1 month ago #196242 by mcovents
I want to do the same thing but this solution doesn't work for me. I have version 3.15.5+181115
Thanks in advance,
Marc.
The topic has been locked.
More
2 years 1 month ago #196246 by DenisChenu
Maybe try
.numeric-item input[data-number] {
    text-align: initial;
}

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 topic has been locked.
More
2 years 1 month ago #196250 by mcovents
No, but I was able to solve the issue by setting "Label column width" and "Text input box width" in "Display" to 8%
Thanks for your response.
Marc.
The topic has been locked.
More
1 year 6 months ago #207947 by ch123
Hey there!
I would like to do the same in Limesurvey 4.3. The code(s) above aren't working.
Is it still possible? :)

Thank you!
The topic has been locked.
More
1 year 6 months ago #207954 by Joffm
Hi,
is there any reason to have numbers left aligned?
Anybody is used to see right aligned numbers.

I admit using the default setting a numeric question doesn't look the best.


But only with the setting of "Text input box width" to 17% and a suffix it is much better.


But if you insist in left-aligned numbers, I do not see an issue using tpartner's css (tested in 4.3.18)

To left-align all numeric inputs, add this to the end of custom.css:

.numeric-item input[data-number='1'] {
    text-align: left;
}



Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: ch123, skywalker23
The topic has been locked.
More
1 year 6 months ago #207956 by ch123
Ah oh no, completely my fault. I did not read the thread properly. I'm sorry...
In my case it's about having the labels before the numerical input left-aligned - I like it better when using multiple numerical input. The input itself/numbers are better on the right, as you write, Joffm.
I am really sorry for the confusion!
Do you have the right code for this too?
The topic has been locked.
More
1 year 6 months ago - 1 year 6 months ago #207958 by Joffm
You may use this:
.form-horizontal label.control-label {
    text-align: left ;
}



Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 1 year 6 months ago by Joffm.
The following user(s) said Thank You: ch123
The topic has been locked.
More
1 year 6 months ago #207961 by ch123
Perfect, it's working :) Thank you!!!
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now