material icon indicating copy to clipboard operation
material copied to clipboard

Right-align icons in md-select

Open davidpoxon opened this issue 10 years ago • 1 comments

I can't right-align an icon in an md-select.

Here is my code-pen that exposes the issue: http://codepen.io/noilly/pen/JXJEdJ

It appears this is because, by default, the icon has a margin of "auto". Setting the margin to "0" appears to correct the issue.

This incorrect behaviour only appears to occur when the menu is open for selection.

davidpoxon avatar Mar 26 '16 06:03 davidpoxon

It looks like you're using <div layout="row" layout-align="space-between">, so I think that is the expected behavior. If you want, you can replace

<div>{{network.ssid}}</div>

with

<div flex>{{network.ssid}}</div>

This will make the name div fill up available space (right now it's only taking up as much space as the text) and it will push the icon to the right. Alternatively, you can put a <div flex></div> between the two to take up available space.

topherfangio avatar Apr 20 '16 19:04 topherfangio