Ng-select: Wrong options position inside class text-center

Created on 18 Apr 2018  路  4Comments  路  Source: ng-select/ng-select

Options position is wrong when using ng-select unser a div with class 'text-center'

<div class="col-md-3 text-center">
    <ng-select [items]="clinets"
               placeholder="azer"
               [(ngModel)]="analysisSearch.clientLabel">
    </ng-select>
</div>

https://b.top4top.net/p_838ifati1.png

More Info

ng-select version: [1.0.3]

browser: [Google Chrome Version 65.0.3325.181]

Most helpful comment

Change it in your program main.scss or whatever your main program css file is. I wouldn't recommend changing it in the default style, if you upgrade the package you will lose it.

All 4 comments

Add this css:

.ng-dropdown-panel {
    left: 0px;
}

@xonuzofa Thanks for your reply, but that only worked after changing the default.theme.css, I don't want to change it, and it didn't work inside my css file associated to that html.

Change it in your program main.scss or whatever your main program css file is. I wouldn't recommend changing it in the default style, if you upgrade the package you will lose it.

Thank you very much, fixed.

Was this page helpful?
0 / 5 - 0 ratings