CSS - Padding all around the dropdown list

Viewed 313

Unable to have padding all around (top, bottom, left, right) a p-dropdown inside a p-table

Code...

<td>
    <p-dropdown name="country" [options]="countries" [(ngModel)]="applicant.country" placeholder="select country"
        (onChange)="getStatebyCountry(applicant.country,$event)" #country="ngModel" required>
    </p-dropdown>
</td>

Functionally its working fine, just its border is stick to column walls.

How to introduce padding all around a p-dropdown in p-table ?

2 Answers

It should be a matter of adding a padding css rule to style this element. Try adding code such as this to your stylesheet. I have added !important, since you may have other styles which could override this.

td {
  padding: 5px !important;
}

Try adding

style="padding: 10px;"

inside p-dropdown tag.

Or do you have any styling code?

Related