How to re-size image inside to avoid scrollbars

44 views
Skip to first unread message

mrunal

unread,
Apr 25, 2012, 2:23:13 AM4/25/12
to fancybox
Hi,
M trying to display image inside iframe. Image dimensions are
is 2048x1536. What i want to do is when user click on link image get
display in small size around 800x600. how to do that?? zooming works
in firefox but not in crome.

<!------------------------------------------------------
SCRIPT------------------------------------------>
<script type="text/javascript">

$(document).ready(function() {
$("#gallery a").fancybox({
'width' : '100%',
'height' : '100%',
'autoScale' : true,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
});
</script>
------------------------------------------------------------------------------------------------------------------
html
------------------------------------------------------------------------------------------------------------------
<div id="gallery">
<a href="upload/<?php echo $rw[2];?>" title="<?php echo $rw[2];?>"><?
php echo $rw[2];?></a>
</div>

Reply all
Reply to author
Forward
0 new messages