Despite trying numerous recommendations (many involving white-space:nowrap
and display:inline-block
), I have been unsuccessful in keeping these child divs on a single line with horizontal scrolling.
This is my code:
<div id="list">
<a href="javascript:show('shown','id1','a1');"><div id="a1" class="inactive">link1</div></a>
<div id="spacer"></div>
<a href="javascript:show('shown','id2','a2');"><div id="a2" class="inactive">link2</div></a>
<div id="spacer"></div>
<a href="javascript:show('shown','id3','a3');"><div id="a3" class="inactive">link3</div></a>
<div id="spacer"></div>
<a href="javascript:show('shown','id4','a4');"><div id="a4" class="inactive">link4</div></a>
<div id="spacer"></div>
<a href="javascript:show('shown','id5','a5');"><div id="a5" class="inactive">link5</div></a>
<div id="spacer"></div>
<a href="javascript:show('shown','id6','a6');"><div id="a6" class="inactive">link6</div></a>
</div>
In essence, this serves as a mobile navigation bar that scrolls horizontally.
The regular version of the bar is vertical (working correctly) and the "spacer" div acts as a separator, transitioning from a horizontal rule to a vertical rule.