Note that there are some explanatory texts on larger screens.

plurals
  1. POHorizontal scrolling using CSS
    primarykey
    data
    text
    <p>So I am trying to accomplish horizontal scrolling for a client using just CSS (I know there are a lot of JavaScript libraries out there that help with this but I'm trying to avoid those). </p> <p>I have some basic code down (thanks to help from this link and the JSFiddle therein: <a href="https://stackoverflow.com/questions/9925754/css-horizontal-scroll">CSS horizontal scroll</a>) but am unable to actually make it work. </p> <p>Here is my example code that I am trying to work with: <strong><a href="http://jsfiddle.net/8Bkxh/" rel="nofollow noreferrer">http://jsfiddle.net/8Bkxh/</a></strong></p> <p><strong>HTML:</strong></p> <pre><code> &lt;section class="row"&gt; &lt;div class="scroll-wrap"&gt; &lt;div class="span4"&gt; &lt;div class="video-list"&gt; &lt;div class="vid-thumb-wrap"&gt; &lt;img class="thumbnail stretch moveback" src="&lt;?php echo base_url('assets/img/video-screenshot.png');?&gt; "&gt; &lt;div class="vid-title"&gt; &lt;h5&gt;In-Studio Tutorial On Recording&lt;/h5&gt; &lt;p&gt;By &lt;a href="#"&gt;David Boone&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- .vid-title --&gt; &lt;div class="callout upcoming"&gt; &lt;p&gt;Purchase Tickets Now!&lt;/p&gt; &lt;/div&gt;&lt;!-- .callout upcoming --&gt; &lt;/div&gt;&lt;!-- .vid-thumb-wrap --&gt; &lt;/div&gt;&lt;!-- .video-list --&gt; &lt;/div&gt;&lt;!-- .span4 --&gt; &lt;div class="span4"&gt; &lt;div class="video-list"&gt; &lt;div class="vid-thumb-wrap"&gt; &lt;img class="thumbnail stretch moveback" src="&lt;?php echo base_url('assets/img/video-screenshot2.jpg');?&gt; "&gt; &lt;div class="vid-title"&gt; &lt;h5&gt;[Interview] The Revolution of Individual Production&lt;/h5&gt; &lt;p&gt;By &lt;a href="#"&gt;Jon Foreman&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- .vid-title --&gt; &lt;div class="callout live"&gt; &lt;p&gt;Happening Now!&lt;/p&gt; &lt;/div&gt;&lt;!-- .callout live --&gt; &lt;/div&gt;&lt;!-- .vid-thumb-wrap --&gt; &lt;/div&gt;&lt;!-- .video-list --&gt; &lt;/div&gt;&lt;!-- .span4 --&gt; &lt;div class="span4"&gt; &lt;div class="vid-thumb-wrap"&gt; &lt;img class="thumbnail stretch moveback" src="&lt;?php echo base_url('assets/img/video-screenshot3.jpg');?&gt; "&gt; &lt;div class="vid-title"&gt; &lt;h5&gt;Q&amp;A From Lengendary Pottery Teacher&lt;/h5&gt; &lt;p&gt;By &lt;a href="#"&gt;George Alexson&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- .vid-title --&gt; &lt;div class="callout limited"&gt; &lt;p&gt;Only 5 Tickets!&lt;/p&gt; &lt;/div&gt;&lt;!-- .callout limited --&gt; &lt;/div&gt;&lt;!-- .vid-thumb-wrap --&gt; &lt;/div&gt;&lt;!-- .span4 --&gt; &lt;div class="span4"&gt; &lt;div class="vid-thumb-wrap"&gt; &lt;img class="thumbnail stretch moveback" src="&lt;?php echo base_url('assets/img/video-screenshot3.jpg');?&gt; "&gt; &lt;div class="vid-title"&gt; &lt;h5&gt;Q&amp;A From Lengendary Pottery Teacher&lt;/h5&gt; &lt;p&gt;By &lt;a href="#"&gt;George Alexson&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- .vid-title --&gt; &lt;div class="callout limited"&gt; &lt;p&gt;Only 5 Tickets!&lt;/p&gt; &lt;/div&gt;&lt;!-- .callout limited --&gt; &lt;/div&gt;&lt;!-- .vid-thumb-wrap --&gt; &lt;/div&gt;&lt;!-- .span4 --&gt; &lt;div class="span4"&gt; &lt;div class="vid-thumb-wrap"&gt; &lt;img class="thumbnail stretch moveback" src="&lt;?php echo base_url('assets/img/video-screenshot3.jpg');?&gt; "&gt; &lt;div class="vid-title"&gt; &lt;h5&gt;Q&amp;A From Lengendary Pottery Teacher&lt;/h5&gt; &lt;p&gt;By &lt;a href="#"&gt;George Alexson&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- .vid-title --&gt; &lt;div class="callout limited"&gt; &lt;p&gt;Only 5 Tickets!&lt;/p&gt; &lt;/div&gt;&lt;!-- .callout limited --&gt; &lt;/div&gt;&lt;!-- .vid-thumb-wrap --&gt; &lt;/div&gt;&lt;!-- .span4 --&gt; &lt;/div&gt;&lt;!-- .scroll-wrap --&gt; &lt;/section&gt;&lt;!-- .row --&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>.row { position: relative; width: 960px!important; } .scroll-wrap { overflow-x: scroll; overflow-y: hidden; height: 180px!important; white-space: nowrap!important; } </code></pre> <hr> <p><em>Be sure to check the three external resources I have linked in that JSFiddle</em></p> <hr> <p>All I want to do is allow the user to scroll through these five items horizontally <strong>not</strong> vertically. </p> <p>I think I'm just having a mental block somewhere and I hope this may be a quick fix for somebody out there. I really appreciate any and all help where possible and I would be happy to clarify where possible. </p> <p>Thanks,</p> <p>Keenan</p>
    singulars
    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