06-12-2012, 06:28 AM
|
|
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,280
|
Quote:
Originally Posted by AdultKing
I am resizing an image using CSS so that always fits within the browser window displaying the image.
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 }
the HTML is
Code:
<div id="sized"><a href="http://example.com"<img src="someimage.jpg" alt="image text" /></a></div>
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 ?
|
if its wordpress
http://viewportindustries.com/blog/a...-in-wordpress/
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
WP Stuff
|
|
|