Results 1 to 2 of 2

Thread: Is it possible to make images 100% height and width in Touch Image Gallery

  1. #1
    Join Date
    May 2014
    Posts
    31
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default Is it possible to make images 100% height and width in Touch Image Gallery

    1) Script Title: Touch Image Gallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...uchgallery.htm

    3) Describe problem:

    I am using Touch Image Gallery to display images, however the size it displays at is measured in pixels whereas I would like to nest the whole gallery in a parent div which I styled responsively and have the Touch Image Gallery display at 100% x 100% of the parent.

    I have looked through the code and found height and width attributes in a few places...

    1) In the <head> copy/paste section

    Code:
    <script>
    
    jQuery(function(){ // on DOM load
    		$('div#touchgallery1').touchgallery({  // initialize first demo
    			width: 250,
    			height: 200
    		})
    		$('div#touchgallery2').touchgallery({  // initialize second demo
    			width: 400,
    			height: 350
    		})
    	})
    
    </script>
    2) In the external touchgallery.js file

    Code:
    (function($){
    
    	var gallerydefaults = {
    		width: 300,
    		height: 250,
    		navarea: '20%',
    		curslide: 0,
    		threshold: 75,
    		navbuttons : ['left.png', 'right.png', -10]
    	}
    3) In the external touchgallery.css file

    Code:
    .touchgallery{
    position: relative;
    overflow: hidden;
    width: 350px; /* default gallery width */
    height: 270px; /* default gallery height */
    }
    But not matter what changes / combination of changes I make I can't seem to get it to render as a percentage size, it either maintains pixel sizing or simply doesn't appear at all. Is there some reason fluid sizing won't work with this or am I just missing something silly?

    Also another unrelated problem I am having with this, less important to me but figured I'd point it out while I was writing anyway, when the cursor is within the threshhold area to click for next/previous it disappears. All functionality is maintained and clicking reveals the next slide, but the cursor can't be seen.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm there's currently no quick way to get the gallery to be fluid in dimensions. I'll take a look at adding such an option the next time the script is updated.
    DD Admin

Similar Threads

  1. Touch Image Gallery thumbnails options?
    By mlegg in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 06-02-2014, 05:22 PM
  2. Need help with Touch Image Gallery
    By djp_12 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-22-2013, 05:40 PM
  3. Does anyone know how to add captions that overlay images in Touch Image Gallery
    By HighHeelTech in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 10-21-2013, 07:08 PM
  4. Touch Image Gallery vs IE
    By Barefoot in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-26-2013, 06:08 PM
  5. Touch Image Gallery
    By Brends in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 07-11-2013, 05:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •