I have a grid made up by cards from the angular material. The problem is: the cards have fixed size, and immediately after the wrapping there is a space on the right. I want to eliminate it, by centering the md-content
. But it has the width of the row, so I can't make any centering properly. How can I fix it (i.e. make the width of the md-content
equal to actual content width)? Thank you.
<md-content layout="row" layout-wrap>
<md-card ng-repeat="channel in $ctrl.channels" ui-sref="" md-ink-ripple>
<div layout-align="center" layout='row' style="width: 160px; height: 160px">
<img ng-src="{{channel.logo_url}}" alt="{{channel.name}}" style="width: 100%;" />
</div>
<footer style="padding: 2px;" layout-align="center">
<h3>{{channel.name}}</h3>
</footer>
</md-card>
</md-content>