Results 1 to 9 of 9

Thread: How to position thumbnails created by Expando

  1. #1
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to position thumbnails created by Expando

    Hi, this is my first-ever post on the DD forum. After some trial and error I managed to get Expando working for me . . . but the instructions on the page
    http://www.dynamicdrive.com/dynamici...pandoimage.htm

    don't seem to tell me how I can position (on my web page) the thumbnails that Expando generates. I'm sure it's just a bit of extra HTML code, but I definitely need it.

    For now all my thumbnails are in the upper-left corner of the page . . . which is where I want to place a logo. How can I get each thumbnail exactly where I want it on the page? THANK YOU

  2. #2
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    Ummm, that would be by inserting them into your HTML where you want them to reside. There's no special 'positioning' instructions. They could go into separate table cells (if you're using tables) or into a wrapper <div> then lined up left to right, top to bottom, etc. etc.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by simcomedia View Post
    Ummm, that would be by inserting them into your HTML where you want them to reside. There's no special 'positioning' instructions. They could go into separate table cells (if you're using tables) or into a wrapper <div> then lined up left to right, top to bottom, etc. etc.
    Basically correct. I would just like to add that for more information (possibly more than you want), one can look here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=40871

    Bear in mind though that this is a reference to an old thread. Link(s) have been removed, and there is an evolution in the thread. So if you are really interested in learning from it, read it all before drawing any conclusions. There is however (at this typing) a solid link near the end to an example of the code being used in the 'real world'. To wit:

    http://www.rubescartoons.com/

    @jimchicago,

    If you want more help, reply here and include a link to a live page on your site (or elsewhere - it doesn't have to be working particularly well, or at all) where you have the script and some content at least that will give us a good idea of what you are attempting to do. In other words - a demo of what the problem is.
    Last edited by jscheuer1; 09-27-2009 at 12:25 AM. Reason: fix typo
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John and sim, thanks for your replies, but: I think my question is simpler, and my HTML knowledge more limited, than you might realize.

    On the DD site page linked in my first post, the "gallery" with the four thumbnails (3 shots of Amsterdam and the leaping cat below them) is nicely positioned near the middle of the page. That's exactly what I want to do with Expando on the page I'm creating, which you can see at http://www.joiedesfleurs.com/dynamic.html.

    I'm using the BlueVoda site builder (from Vodahost), which allows me to enter HTML code into six different sections of the page: Start of Page, Between Head Tag, Inside Body, Beginning of Body, End of Body, End of Page (BlueVoda also lets me edit HTML in a more traditional, "view all code" view). Right now in the Between Head Tag section have the "boilerplate" code for Expando:

    <style type="text/css">

    img.expando{ /*sample CSS for expando images. Not required but recommended*/
    border: none;
    vertical-align: top; /*top aligns image, so mouse has less of a change of moving out of image while image is expanding*/
    }

    </style>

    <script type="text/javascript" src="expando.js">

    /* Expando Image Script ©2008 John Davenport Scheuer


    Should I revise this code (maybe the "vertical-align" value?) in order to place the gallery farther down on the page? I'd really like to be able to position the upper-left corner of the gallery at a specific pixel location. Can I do that, and if so, exactly what code should I type in where? I have not used <div> tags before, so maybe I need a tutorial on how to use them. Thank you.
    Last edited by jimchicago; 09-28-2009 at 05:24 PM.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Using a text only editor (like NotePad), copy and paste the below code exactly to either overwrite your existing page or to create a new one in the same folder:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Untitled Page</title>
    <style type="text/css">
    
    img.expando{ /*sample CSS for expando images. Not required but recommended*/
    border: none;
    vertical-align: top; /*top aligns image, so mouse has less of a change of moving out of image while image is expanding*/
    }
    
    </style>
    
    <script type="text/javascript" src="expando.js">
    
    /* Expando Image Script ©2008 John Davenport Scheuer
       as first seen in http://www.dynamicdrive.com/forums/
       username: jscheuer1 - This Notice Must Remain for Legal Use
       */
    
    </script>
    </head>
    <body bgcolor="#7B7BC0" text="#000000">
    <div id="bv_Text2" style="width: 775px; height: 53px; margin: 0 auto; text-align: center;">
    <font style="font-size:13px" color="#FFFFFF" face="Arial">HERE IS SOME TEXT THAT I WANT TO POSITION </font><font style="font-size:19px" color="#FFFFFF" face="Arial"><b>ABOVE</b> </font><font style="font-size:13px" color="#FFFFFF" face="Arial">THE ROW OF THUMBNAILS GENERATED BY EXPANDO<br>
    <br>
    </font></div>
    <div style="height: 75px; margin: 0 auto; text-align: center;">
    <img class="expando" border="0" src="0476_0013.jpg" width="100" height="75" alt="">
    <img class="expando" border="0" src="0499_0021.jpg" width="100" height="75" alt="">
    <img class="expando" border="0" src="doutzen.jpg" width="100" height="75" alt="">
    <img class="expando" border="0" src="0493_0009.jpg" width="100" height="75" alt="">
    </div>
    
    </body>
    </html>
    Last edited by jscheuer1; 09-29-2009 at 06:12 AM. Reason: correct minor syntax issues
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for all that code, John, but because I'm so used to my page-builder program's WYSIWYG, drag-and-drop-each-page-element interface, I decided not to use your code. Instead, I created another "test" page with Expando on it:
    http://www.joiedesfleurs.com/alternative.html

    But this time I used my page builder's drag-and-drop tool for placing HTML right where I want it on the page (don't know why I had forgotten about that tool, but glad I remembered). In that drag-and-drop I placed the following image-specific code (after placing the Expando "boilerplate" code in between the <head> tags):

    <p>
    <img class="expando" border="0" src="0476_0013.jpg" width="100" height="75">
    <img class="expando" border="0" src="0499_0021.jpg" width="100" height="75">
    <img class="expando" border="0" src="doutzen.jpg" width="100" height="75">
    <img class="expando" border="0" src="0493_0009.jpg" width="100" height="75">
    <img class="expando" border="0" src="0497_0006.jpg" width="100" height="75">
    </p>

    And just like that, I'm able to move the row of thumbnails generated by Expando to wherever I want it on the page. Only problem is, it's now a VERTICAL row of thumbnails, and I'd much rather have them in a horizontal row.

    Can you tell me how to tweak the HTML so the thumbnails will be horizontal row? THANKS.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Change your style to (additions/changes red):

    Code:
    img.expando{ /*sample CSS for expando images. Not required but recommended*/
    border: none;
    vertical-align: top; /*top aligns image, so mouse has less of a change of moving out of image while image is expanding*/
    }
    
    #bv_Html1 {
    width: auto!important;
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    Thanks, John, that worked! Kind of surprising that the row would go horizontal by inserting the word "vertical" into the code in place of "horizontal." I'm just glad it works.

    Now, what if I have a horizontal row of thumbnails and I want to split it into two separate rows?
    Last edited by jimchicago; 09-30-2009 at 03:26 PM.

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You can try using the <br> tag or simply make two separate rows. I'm not sure of the best approach or if it matters, one of these will probably work. I would favor two separate rows if it works. There could even be other ways. The difficulty I'm having is that I would never code the page as your editor has in the first place, so it is hard for me to visualize the consequences in advance for any specific code change/addition.

    As to the horizontal vs. vertical - there is no horizontal-align property, so that statement simply removed that style (which was there in the first place to help keep the mouse on the image during expansion). The way the page was styled when I looked at it last, it is the width of the container that either constricts the images to a vertical orientation or (as happened after my change) allows them to expand freely with no restriction in the horizontal direction.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •