PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Unable to modify text alignment #94

Closed laurianem closed 7 years ago

laurianem commented 7 years ago

Hi, I'm trying to get the text in the dropdown vertically centered in the text input (see pictures). I've tried using css with line-height property and padding-top but nothing seems to work. Are these css properties supported for the dropdown?

screen shot 2017-05-08 at 6 00 24 pm screen shot 2017-05-08 at 6 00 31 pm

My code looks like this :

<DropDown class="form-item language-dropdown" [class.error-form]="_formGroup.get('culture').invalid" formControlName="culture" returnKeyType="done" horizontalAlignment="stretch" verticalALignment="stretch" (returnPress)="_formGroup.get('culture').enable()" (opened)="_formGroup.get('culture').value === (null||undefined||'') && _formGroup.get('culture').setValue(0)" [items]="cultureLabels"> </DropDown>

Thanks!

PeterStaev commented 7 years ago

Hey @laurianem , I've just tested with the demo-ng project and padding-top is applied correctly. I see you are applying multiple classes to the drop down, so make sure some does not override your values, or some CSS rules are more specific and do not apply your padding. I would suggest you remove all your classes and make one new class with the padding, and the start adding back the other classes and see which one is overriding it.

laurianem commented 7 years ago

Yeah you are right, I had CSS conflict somewhere else. Thanks for you time, very appreciated!