How to display your random images in rows.

Posted by on Jan 20, 2010 in Howto, Lazyest Gallery and tagged , , ,
16 Comments

Some Lazyest Gallery users asked me if it is possible to display random images in rows and columns. The answer is yes! and it's quite easy. Just some simple css rules should do the trick.
First step is to think about how many image columns you want to display. The images together should fit in the sidebar. The thumbnail you've set in Lazyest Gallery settings could be too large, so you have to set the size of your random image thumbnail in your theme style sheet.

Let's look at the random images on this site. I've chosen a size of 48 pixels (the normal thumbs are 120 pixels). Three thumbs fit together in the sidebar. When I set the display rule for the <p> with class lg_thumb_image element as inline, the images display side by side.
The code I have added to my style sheet is:
#sidebar p.lg_thumb_image { display: inline; }
#sidebar .lg_thumb_image img { height:48px; width:48px; }

BTW replace #sidebar by your sidebar's id.

16 Comments

  1. af3
    13 December 2010

    Hi,
    The random img widget is taking random images for specific album. How do I set so that the random img is from random album?

    Thanks

    • developer
      13 December 2010

      If you leave the folder input blank, the folder will be chosen randomly.

  2. Jax
    29 November 2010

    sorry to have to ask another question, but I am new to wordpress still.
    What do you mean by replace #sidebar by your sidebar’s id?

    • Marcel
      30 November 2010

      In your theme, the sidebar element has an id like <div id="sidebar">. Maybe the sidebar is not called sidebar but e.g. right-bar. In your stylesheet put #right-bar instead of #sidebar

  3. kristlbel
    18 May 2010

    I’m using the wordpress class 1.5 sidebar by Dave Shea. Which css stylesheet should I edit to get the sidebar to display 3 columns of random images? What should the stylesheet id be?

    Thanks!

    • developer
      18 May 2010

      You can put in the stylesheet for your theme.
      Replace the #sidebar in the example by the ID used in your theme/plugin

      • kristlbel
        19 May 2010

        thanks! i got it!

  4. roger
    12 May 2010

    thanks for the info. i am not a programmer so these simple steps help me.

  5. Kermit Woodall
    12 April 2010

    I am not having any success with this. I think perhaps the theme I am using has more than just the sidebar ID needing to be referenced. The sidebar widgets have deeper nested divs than your site here has.

    Any ideas?

    Thanks.

    Kermit

    • marcel
      13 April 2010

      could you plz send your theme to
      lazyest(at)brimosoft.nl
      so I can check?

  6. Kermit Woodall
    11 April 2010

    Is there a way to turn off the breadcrumb links at the top of the galleries?

    Kermit Woodall
    Managing Editor
    GadgetNutz.com

  7. Lara
    30 January 2010

    Hi, I’m using LG with Thickbox. Is it possible to see full sized images with Thickbox? Or is there a way to at least insert a link to the full sized version?
    thanks!

    • marcel
      30 January 2010

      Yes that is possible, but don’t let the thickbox plugin add the codes to your image links

      • Lara
        31 January 2010

        Thanks, Marcel. What I’m trying to get is a “full image” link placed IN the Thickbox slider, I have navigation links “next” “previous” “close” and captions. But I’d also like to give the option for the user to see the full sized version of the image (outside Thickbox) similar to SmoothBox. But the standard view would still be with Thickbox, the link to the full sized image would be somewhere in the Thickbox bottom navigation area. Is this possible? I know there is a TB_FullSize option but I don’t know how to insert it in the JS file to get this simple link in Thickbox. Any help appreciated! Thanks in advance.

        • marcel
          31 January 2010

          Sorry Lara, I can’t help you here. Please refer to the Thickbox plugin website.

          • Lara
            1 February 2010

            I understand, no problem! Thanks anyway, you’re doing an amazing job with Lazyest Gallery.