I want to make a horizontal section, like Quora.com
Here is what I come up with
<div class="out-wrapper">
<div class="inner-wrapper">
<% 6.times do %>
<a class="nav-link pull-left" href="#">Nav 1</a>
<% end %>
</div>
</div>
.out-wrapper{
overflow-x: scroll;
.inner-wrapper{
/* width: 600px; */
.nav-link{
padding: 10px;
}
}
}
Demo: http://codepen.io/anon/pen/XJZyog
I can only create a horizontal scroll
if I set the width
to a fixed value.
How can I do this without specify a fixed value? Like width: overall-width-of-children
So the width would automatically be the sum width of its all elements