I am currently working with a grid composed of cards from the Angular Material library. The issue I am facing is that the cards have a fixed size, which results in extra space on the right immediately after wrapping. My goal is to eliminate this space by centering the md-content
. However, since the width of the row determines the width of the md-content
, proper centering becomes challenging. How can I resolve this and make the width of the md-content
equal to the 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>