Page 1 of 1

How do you justify the label in a drop down?

Posted: Fri Jul 11, 2014 11:21 pm
by Aeneas McBurney

I want to left justify the label in a dropdown but its always in the center. Whats the easiest way to do this?


How do you justify the label in a drop down?

Posted: Sat Jul 12, 2014 1:25 am
by Alena Prykhodko

Hello,

You can style it with JS, for example:
preAppery('label').css('text-align','left');/pre


How do you justify the label in a drop down?

Posted: Sat Jul 12, 2014 11:12 pm
by Aeneas McBurney

Hi thanks for the reply. This works on the actual dropdown items but not the selected item which is still in the centre. Is there something else I should be doing?


How do you justify the label in a drop down?

Posted: Sun Jul 13, 2014 5:29 am
by Alena Prykhodko

Please show us what you have tried and what doesn't work. Screen shot of your drop down list will help. How do you populate it?


How do you justify the label in a drop down?

Posted: Sun Jul 13, 2014 7:59 am
by Aeneas McBurney

I am populating directly from the properties window. Please see attached screenshot

Image


How do you justify the label in a drop down?

Posted: Sun Jul 13, 2014 8:57 am
by Alena Prykhodko

You can add this code on Screen load event
pre$('.ui-select a, .ui-selectmenu-list li a, .ui-selectmenu').css('text-align','left');/pre


How do you justify the label in a drop down?

Posted: Mon Jul 14, 2014 3:43 am
by Aeneas McBurney

Thanks that works. Not sure how but it does :)


How do you justify the label in a drop down?

Posted: Wed Mar 18, 2015 4:56 am
by Aeneas McBurney

I have a some drop downs on a popup that I want to apply the same lefft justification to. When I add this on load

$('.ui-select a, .ui-selectmenu-list li a, .ui-selectmenu').css('text-align','left');

only the dropdowns on the main pages are left justified. How do I make the ones on the popup the same?


How do you justify the label in a drop down?

Posted: Wed Mar 18, 2015 10:43 am
by Egor Kotov6832188

Hello Aeneas,

1) using javascript just to change one style for component is not a good idea, it will be more efficient and right to CSS styles, cause each component on the page can add to hierarchy part of selector.

2) You need to find active selector for component you would like to change
in this tutorial you can learn how to find and apply css styles to component.
http://blog.bismallion.com/appery-tut...