View Single Post
Old 06-12-2012, 06:28 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,280
Quote:
Originally Posted by AdultKing View Post
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
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote