Changing lightbox dimensions for iframes

  • Posted in : BookCard
  • americanbutter
    Participant

    Currently, it seems that for portfolio items that load an iframe (videos) the iframe has a pre-set height and width. How do I change these values? It’s sized to display a video but I would like to change the dimensions to content that is taller than wider.

    I’ve looked at the main.css and jquery.fancybox-1.3.4.css files.

    ahmetsali
    Keymaster

    Hi,

    edit js/main.js and find line : 383 , you will see the width and height attributes;

    		if($("a[rel^='fancybox']").length) {
    			$("a[rel^='fancybox']").fancybox({
    				centerOnScroll : true,
    				padding : 0,
    				margin : 44,
    				width : 640,
    				height : 360,
    

    you can edit these values.

    americanbutter
    Participant

    the above worked for the desktop version but how I would change the fancybox height or enable scrolling within the fancybox when in mobile mode?

    americanbutter
    Participant

    Also looking for a layout similar to this. Are you available (paid project) to help with these modifications?

    http://eatmykitchen.com/fancybox_project1.jpg

    ahmetsali
    Keymaster

    you can specify different values for mobile devices;

    width : $(window).width() < 640 ? 320 : 640,
    height : $(window).width() < 640 ? 180 : 360,
    

    in this scenario, mobile dimensions will be 320x180, and desktop dimensions will be 640x360.

    Also if you can provide your url i can check what cane be done for lightbox inline scrolling.

    Note: sorry we don't provide paid further customization services.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register