I have tried to auto resize the image using the CSS property max-width
, but it does't work in IE7 and IE8. Is there any way to auto resize the image with pure CSS in IE7 and IE8?
相关问题
- Views base64 encoded blob in HTML with PHP
- How to get the background from multiple images by
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
Use
width: inherit;
to make it work with pure CSS in IE8. (See responsive-base.css.) Like this:I'm not sure if that works in IE7—please test it and let us know if you're testing IE7. Before I figured out the
width: inherit
technique I was using the jQuery below, so you could try it if you really need support down to IE7 and the first technique doesn't work:You need a one-time cached expression for IE 6-7.
Example: http://kizu.ru/lib/ie/minmax.html JS source file: http://kizu.ru/lib/ie/ie.js
Author: Roman Komarov
Doesn't IE 7&8 recognise the following:
I tested it and working for every browser
Use
max-width: 100%
withheight:auto
, pluswidth:auto
for IE8:Most web-developers know that IE has fallen behind in the race for standards and being able to show the latest and greatest. Many CSS2 properties are unsupported. Some of the more useful ones, are properties such as max-width, max-height, min-width and finally min-height. Try this: