When resizing the window, I noticed that the description box next to the pop-up image in fancybox does not adjust its size accordingly. The image reduces in size but the description box remains the same. Is there a way to make the description box resize along with the image? Any suggestions would be appreciated.
JSFIDDLE: http://jsfiddle.net/tqnk7e3f/4/
HTML:
<a caption="<h2>Image Header</h2><p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>" rel="Sold" class="fancybox" data-fancybox-group="thumb1" href="http://fancyapps.com/fancybox/demo/4_b.jpg"><img src="http://fancyapps.com/fancybox/demo/4_s.jpg" alt="" /></a>
<a class="fancybox hidden" data-fancybox-group="thumb1" href="http://fancyapps.com/fancybox/demo/3_b.jpg"><img src="http://fancyapps.com/fancybox/demo/3_s.jpg" alt="" /></a>
<a class="fancybox" data-fancybox-group="thumb2" href="http://fancyapps.com/fancybox/demo/2_b.jpg"><img src="http://fancyapps.com/fancybox/demo/2_s.jpg" alt="" /></a>
<a class="fancybox hidden" data-fancybox-group="thumb2" href="http://fancyapps.com/fancybox/demo/1_b.jpg"><img src="http://fancyapps.com/fancybox/demo/1_s.jpg" alt="" /></a>
CSS:
.hidden {
display: none;
}
.fancybox-title {
right:auto;
height:auto;
left:-260px;
margin-bottom:auto;
/* CHANGES */
top: 0;
}
.fancybox-title .child {
height: auto;
white-space:normal;
text-align:left;
height:470px;
padding:0 20px;
max-width:200px;
margin-right:auto;
border-radius:0;
}
.fancybox-title .child h2 {
font-size:140%;
line-height:1.5;
margin-top:20px;
margin-bottom:15px;
}
.fancybox-title .child p {
margin-bottom:30px;
}
JQUERY:
$('.fancybox').fancybox({
prevEffect : 'fade',
nextEffect : 'fade',
padding:0,
closeBtn : true,
arrows : true,
nextClick : true,
helpers : {
title : { type : 'outside' }
},
helpers : {
thumbs : {
width : 80,
height : 80
}
},
beforeLoad: function() {
this.title = $(this.element).attr('caption');
}
});