Ie Doesn't Support Height=Auto for Images, What Should I Use

IE doesn't support height=auto for images, what should I use?

The solution was to add the typical IE fix :(

css:

height:auto !important;

Images get stretched out using height: auto. What's the substitute for this?

Just add align-items:center property in your stylesheet to your existing bootstrap class property because by default its align-items:stretch. Example below;

.justify-content-center{
align-items: center;
}
<div class="col-lg-4 d-flex justify-content-center">
</div>

iframe height in % doesn't work with IE

In fact it isn't a problem with IE, in Firefox I can see the same as in IE.

Try to put:

html, body{
height: 100%;
}

This happens because the browser by default sets the width to 100% for all the block elements, but this is not the default behaviour for the height.

SVG with width/height doesn't scale on IE9/10/11

This happens when your image is missing the viewBox attribute on the svg element.

Yours should be set to: 0 0 640 480. The zeros are X and Y offsets and the 640 and 480 correspond to the width and height. It defines a rectangle that represents the boundaries of the image.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="480" width="640" viewBox="0 0 640 480">

Max-height on img not working in IE

you should put 100% height on img and width: auto isn't even nessery, but check the wrapping div before that if it does have real height it may be the image height isn't even the 10% height of the div above it (max-height applise only when the original size is bigger then 100% of the wrapping allement

checked it againg the wrappering element of the image doesn't really have fixed height...

header {
height:10%;
}
.logo {
float:left;
height: 100%;
}
.logo img{
height: 100%;/height:inherit;
}


Related Topics



Leave a reply



Submit