Adya Mishra
Adya Mishra

Reputation: 11

How to do CSS customization in ejs-dropdownlist in Angular

<ejs-dropdownlist [dataSource]='data' placeholder='Search Fields' class="ejs-dropdownlist">
</ejs-dropdownlist>

this is my html tag and I want the placeholder to have font-size 15 and color grey. How to do it?

Upvotes: 1

Views: 1987

Answers (2)

Beller
Beller

Reputation: 888

You can do it with:

select + input::-webkit-input-placeholder { /* Edge */
  font-size: 15px;
  color: grey;
}

select + input:-ms-input-placeholder { /* Internet Explorer 10-11 */
  font-size: 15px;
  color: grey;
}

select + input::placeholder {
  font-size: 15px;
  color: grey;
}

But here you can find something similar: How to change placeholder color of specific input field?

Upvotes: 0

Cagri Tacyildiz
Cagri Tacyildiz

Reputation: 17570

to do these kind of process, open developer console and inspect to element find class name of element. Then in style.css write the css code. For library element component.css does't work. You need to use style.css

select .e-input::placeholder {
  font-size: 15px;
  color: grey;
}
select .e-input::-webkit-input-placeholder  {
  font-size: 15px;
  color: grey;
}
select .e-input::-ms-input-placeholder {
  font-size: 15px;
  color: grey;
}

Upvotes: 1

Related Questions