Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do you justify the label in a drop down?

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How do you justify the label in a drop down?

Hello,

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

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do you justify the label in a drop down?

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?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How do you justify the label in a drop down?

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?

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do you justify the label in a drop down?

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

Image

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How do you justify the label in a drop down?

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

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do you justify the label in a drop down?

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

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

How do you justify the label in a drop down?

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?

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

How do you justify the label in a drop down?

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

Return to “Issues”