Results 1 to 4 of 4

Thread: centering images in the thumbnail viewer window

  1. #1
    Join Date
    Jan 2009
    Location
    Toulouse France
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default centering images in the thumbnail viewer window

    div loadarea
    http://www.barbaranascimbeni.com/Pag...aiGalerie.html

    I'm using thumbnail viewer and it works fine, but I have pictures of different size and I'd like to have them always showing at the center of the viewing window, I went through the forum but couldn't find the answer. I believe it would be possible with a little code adjustement in the .js, but I don't know nothing about coding. could somebody help me?
    I'd rather stick to div instead of introducing tabs, although if it's the only way (which I doubt) I'll do it.
    Also I'd like to change the style of the text in the title under the picture, not so hot on times roman.
    thank you
    did
    Last edited by dibequiard; 01-27-2009 at 06:19 PM.

  2. #2
    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

    In future, please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.


    If this is the script I'm thinking about, you can use a table instead of a division for the loadarea:

    Code:
    <table><tr>
    <td id="loadarea" style="text-align: center;vertical-align: middle;width: 250px;height: 200px;">
    </td></tr></table>
    Set its width to at least as wide as the widest image, set its height to at least as tall as the tallest image.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2009
    Location
    Toulouse France
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thank you
    I'll try again following your recommandations,
    If I could I'd like to avoid using tabs and stick to div.
    did

  4. #4
    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

    Why? There is virtually no difference in this case other than presenting your content as desired. Tables have drawbacks, but not in this case. If you want to make it otherwise just like a div:

    Code:
    <table style="border: none;border-collapse: collapse;table-layout: fixed;margin: 0;padding: 0;"><tr>
    <td id="loadarea" style="margin: 0; padding: 0;text-align: center;vertical-align: middle;width: 250px;height: 200px;">
    </td></tr></table>
    Using the above styles (which of course can and should be in a stylesheet, selected for these elements by tag name, and/or class, and/or id), make it render just as fast as a div, and without any added layout space.

    I know many folks are anti-table. But they are just fine when used either for tabular data (as they are really intended) or in the manner I just outlined, where none of their inherent weaknesses can come into play.
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    dibequiard (01-28-2009)

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
  •