1

I am new to "angularjs".

I need to give border to the dropdown and set font size of the contents of the dropdown. I tried to style in the following manner, but it doesn't work -

<md-input-container style="font-size:11px;font-family:verdana;border-width:2px;border-color:darkgray">
  <md-select ng-model="anfcntrl.selbndlegalentities" multiple="">
    <md-option ng-value="legalentity.name" ng-repeat="legalentity in anfcntrl.bndlegalentities"
    style="font-size:11px;font-family:verdana;border-width:2px;border-color:darkgray">{{legalentity.name}}
    </md-option>
  </md-select>
</md-input-container>

Question: Is there a way to give border to the dropdown and set font size of the dropdown items?

devman
  • 496
  • 5
  • 24

1 Answers1

2

Example applying green border:

md-select-menu md-content md-option {
     border:1px solid green;
     font-size: 10px;
}
Tranquillity
  • 237
  • 2
  • 9
  • Thank you. Using this style I was able to border the contents of the md-select but the font size remain unchanged. Is there any other way to set the font size of the contents? Additonally, I was able to set border and font size of the "md-select" itself using style - md-select {border:2px solid gray; font-size:12px; font-family:verdana;} – devman Jan 11 '20 at 09:44
  • yes for content you can do: md-select-menu md-content { background-color: blue; } – Tranquillity Jan 13 '20 at 10:00
  • md-select-menu md-content { background-color: blue; } works. But why I try md-select-menu md-content { font-size: 8px; } the style doesn't work. – devman Jan 13 '20 at 15:04
  • check here, I applied background and size (check css section last css): https://codepen.io/tranquillity/pen/WNbyXQY – Tranquillity Jan 13 '20 at 16:16