Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Location
    Paris, FRANCE
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Dynamically resizable thumb gallery with names

    Howdy all!

    After enough fiddling with my HTML script, I've decided to go and ask knowledgeable people to help me with what particular behaviour I'm trying to achieve on a page. (I expect this is still a very noobie question so I hope I'm posting in the proper forum section, otherwise please bear wih me).

    So, what I'm trying to display on my page is a gallery (about 250 or so) of portrait thumbnails, disposed in lines and rows (don't need them to be aligned though), each thumb with a text string (corresponding name to each portrait) place immediately under.
    I'v been using a table to achieve this placement of the names under each thumbs disposed in lines/rows so far to good avail (each cell containing the thumb + the name, separated by a <BR> balise to have the name place imediately under).

    BUT (herein lies the problem obviously) I'd also like to have the number of _rows_ in the display of my thumbs dynamically adapting to the width of the browser window (in order to adjust to smaller screen resolutions or to a user resizing his browser). The point being ultimately to never have a thumb in a line partially or completely offscreen.

    So I'm stuck with this so far : either I use free (ie. without table) thumbs which will always cover the full window surface dynamically in a gallery, but then I don't know how to have a name placed under each thumb, or I use a table to force the name under each thumb in a cell, but then I loose the "number of thumbs per line always dynamically fits the width of the window" feature.


    I hope I'm explaining all this clearly enough. Can anyone please help me figuring a way to achieve both? Either forcing a textstring under each thumb of my gallery without using a table, or (if that's even possible?) having a table's number of rows per line always dynamically fitting the window width.
    I'm eagerly looking for help on this one so loads of thanks in advance to any among you who'll come to the rescue! (^_^)

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,994
    Thanks
    15
    Thanked 233 Times in 233 Posts
    Very easy to do in fact. Put the thumbnails in divs or ps of the proper size, then float them left or right, left is usually best, in a container that re-sizes with the window. And of course, put the text at the bottom of each div by using a line break and maybe a paragraph. If you have any more problems I'll be glad to help.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • Users who have thanked DrDOS for this post:

    Angar (06-27-2013)

  • #3
    New to the CF scene
    Join Date
    Jun 2013
    Location
    Paris, FRANCE
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That's right, DIVs!!!
    I feel stupid now. I'm just still not used to use them at all so it never comes to mind as an alternative I suppose.

    Well you've been of huge help pointing me to the right direction, thank you so much! Should I face with further difficulties I'll take you on your word and come ask again, but I expect it should be ok from here.
    Thanks again Dr !!


  •  

    Posting Permissions

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