I try to make a slider but have trouble, with placing all my div tags in one line. How do I do that?
And how to do auto-width for #slider_content?
<div style="width: 100px; height: 20px; background: #FFA; overflow:hidden">
<div id="slider_content">
<div style="width:50px; height: 50px; background: #ccc; float:left">1</div>
<div style="width:50px; height: 50px; background: #faa; float:left">2</div>
<div style="width:50px; height: 50px; background: #ccc; float:left">3</div>
<div style="width:50px; height: 50px; background: #faa; float:left">4</div>
<div style="width:50px; height: 50px; background: #ccc; float:left">5</div>
<div style="width:50px; height: 50px; background: #faa; float:left">6</div>
</div>
</div>
The width of your outermost DIV is far too narrow – increase it to be at least 300px.
Alternatively set the widths of your innermost DIVs to be a percentage which total <= 100%, then set slider_content to have width of 100%.
e.g.