I am resizing an image using CSS so that always fits within the browser window displaying the image.
The CSS I am using is
the HTML is
It works fine in Safari and Firefox, however will not work on the iPad or iPhone. On those devices it just shows the full sized image not constrained within the DIV.
Does anyone have any idea on a better way to do this within the constraints of plain CSS and HTML ?
The CSS I am using is
Code:
div#sized { text-align: center; }
div#sized img{ height: 90%; border: none; padding:15px; top: 10%; position: relative }
Code:
<div id="sized"><a href="http://example.com"<img src="someimage.jpg" alt="image text" /></a></div>
Does anyone have any idea on a better way to do this within the constraints of plain CSS and HTML ?


Comment