Closed ravishan110 closed 8 years ago
i think this is the same #761
Here is a fixed CodePen: http://codepen.io/team/AngularMaterial/pen/wMEjZL
The solution appears to be:
md-card>:not(md-card-content) img, md-card>img {
height: 100% !important;
}
@ravishan110 - can you confirm this pen works as desired in IE or your own specific browser?
Fixed in SHA df90238
http://codepen.io/Noppey/pen/WraZmG
I copied the first card Demo of the Angular Material website to codepen. This doesn't scale height in Chrome v48.0.
Only things I've edited are flex-gt-xs="10" and image url
Your html was invalid. Try this:
<body layout-fill>
<div ng-controller="AppCtrl" layout='column'>
<md-content class="md-padding" layout-xs="column" layout="row">>
<md-card> ... </md-card>
</md-content>
</body>
Sorry, i was out. so i didnt get the chance to check it out earlier. I fixed the issue for me by removing "md-card" and using "whiteframe" instead. Whiteframe can give same kind of effect as card. Rest of the contents, i left same as earlier. Hope this may work for other users as well.
I am trying to render an image within md-card. Its width is fixed(equals to card width), but the height is not adjusting automatically to keep the aspect ratio same. The height of the image is coming same to same as the original image. If anyone can tell how to automatically adjust the height of the image.