Note that there are some explanatory texts on larger screens.

plurals
  1. POAlign DIVs horizontally within a scrolling div
    primarykey
    data
    text
    <p>I'm working on a photography website. One of the things we're trying to aim for is a 'film strip' type of display for the images, as opposed to the usual thumbnail or 'tabulated' formation.</p> <p>It works with tables. No problemo. The only thing that makes me not want to use a table is the fact that I'm not showing data, there's no need for columns and rows.</p> <p>Another thing that is a slight spanner in the gears is the fact that I'm putting the images as backgrounds of divs. This is for basic 'copy protection', and also so I can overlay items over the photo on hover of the div.</p> <p>The way I've got it coded at the moment is:</p> <pre><code>container [ [image] [image] [image] [image] ] </code></pre> <p>I've drawn a skitch to help out with the visualisation of this..</p> <p><img src="https://i.stack.imgur.com/3LCui.png" alt="alt text"></p> <p>As soon as the width of the container is met, the image-divs are dropping to the next line. The CSS for the Divs is as follows:</p> <pre><code>.gallery_block_image_p { width: 354px; height: 532px; display: inline-block; margin: 0px; padding: 0px; margin-left: 10px; float: left; background-repeat: no-repeat; } </code></pre> <p>and for the container...</p> <pre><code>#gallery { border: 0px solid black; position: relative; top: 99px; /* width: 8000px; */ /* When this is uncommented it works, with a huge amount of space to the right */ height: 532px; z-index: 99; } </code></pre> <p>and last but not least, the HTML used for the image divs...</p> <pre><code>&lt;div id="gallery_1_0_img" class="gallery_block_image_p" style="background-image: url(gallery_img/ith/adamd_20101021_137.jpg);"&gt;&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload