I can make an image responsive with this inline code:
<img src="images/foo.png" alt="blah" title="yada" style="max-width:100%; height:auto;" />
No break points necessary, it auto-resizes with window size.
I’d rather not use inline styling, though. But I can only achieve responsive images by using this in a stylesheet:
-webkit-background-size:n%; -moz-background-size:n%; background-size:n%; background-position: n% n%;
But with that, I have to create a number of break points, which really should be unnecessary.
Is there way to achieve the inline result, but via stylesheet?
- The topic ‘Responsive image resizing’ is closed to new replies.