Skip to content

Instantly share code, notes, and snippets.

@christopherhill
Created February 8, 2014 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christopherhill/8883942 to your computer and use it in GitHub Desktop.
Save christopherhill/8883942 to your computer and use it in GitHub Desktop.
.container {
/* removed width here */
border: 1px solid black;
height:80px;
overflow-x:auto;
overflow-y:hidden; /* turns off y-scrollbar */
display:block;
}
.image-container {
background: blue;
border:1px solid black;
width:50px;
height: 50px;
}
/* changed to a div */
.span-container {
background: green;
border:1px solid black;
width:50px;
height: 50px;
float: left;
}
<table>
<thead>
<tr>
<th>
<div class="container">
<div class="span-container">
<div class="image-container">
<img src="http://jsfiddle.net/img/logo.png"/>
</div>
<div>Test</div>
</div>
<div class="span-container">
<div class="image-container">
<img src="http://jsfiddle.net/img/logo.png"/>
</div>
<div>Test</div>
</div>
<div class="span-container">
<div class="image-container">
<img src="http://jsfiddle.net/img/logo.png"/>
</div>
<div>Test</div>
</div>
<div class="span-container">
<div class="image-container">
<img src="http://jsfiddle.net/img/logo.png"/>
</div>
<div>Test</div>
</div>
<div class="span-container">
<div class="image-container">
<img src="http://jsfiddle.net/img/logo.png"/>
</div>
<div>Test</div>
</div>
</div>
</th>
</tr>
</thead>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment