Safari Image Size Auto Height CSS
Just set only the width on the image. The browser will scale the image proportionally automatically.
.userImg { width: 100%; }
.imgContainer { height: auto; width: 150px; }
Safari css height: auto; and height: 100%; stretches image. Does not happen in firefox or chrome
In the fiddle example I see that the for 'figure img'
selectors min-height
property is set to 100%
which makes the image stretch its height to the whole block. Remove that and it would work.
Safari (Win7) does not refresh img height with max-height property
New version
div {
height: 100px;
width: 200px;
background: red;
position: relative;
}
img {
max-width: 100%;
max-height: 100%;
position: absolute;
}
Seems to be working as expected. Fiddle
CSS not working in Safari, but in Chrome and other browsers it does
You need to remove background-attachment : fixed
not supported on the safari , check it here Can I use , last parameter of background css key is an attachment
Related Topics
Can You Make Ie 9 (Or Earlier) Lay Out Table Elements as If They Were Regular Display:Block Elements
Setting a Table to Display: Block
Svg in Opera Using CSS Background-Image with Scaling
What Is the Correct Usage of CSS Attr Function
Css: How to Attach an Arrow to a Div and Make It Overlap the Border
Image Height Inside Flexbox Not Working in Chrome
How to Create a Lollipop Shape by Stacking Divs in a Circular Manner
Fonts and Font Awesome Icons Not Loading Over Ssl
Css3 Background-Position Issue with Safari Only
Search Button Inside the Search Box Like Bing
Web Design for Smart Phone - Pixel Size
@Font-Face Custom Icon Font Only Showing Unicodes
Make Table Header Fixed When Scrolling
Strange Scrollbars Around the Svg Background in Chrome
Spring-Boot Resourcelocations Not Adding the CSS File Resulting in 404
Convert Arabic Ttf/Otf Fonts to Woff, Eof
How to Use CSS Attribute Selector for an Svg Element with Namespaced Attribute Href