I am designing a horizontal image viewer where images are viewed in a horizontal line with the following html:
<div style="margin-top: 10%;width: 95%;margin: 0 auto">
<div style="width: 1950px" id="innerScroll">
<span style="display: inline-block;">
<a href="...">
<img src="..." />
</a>
</span>
<span style="display: inline-block;">
<a href="...">
<img src="..." />
</a>
</span>
<span style="display: inline-block;">
<a href="...">
<img src="..." />
</a>
</span>
...
...
</div>
and later I am going to make the inner div scroll using jQuery.
The problem is the width of the inner div, the content may be displayed differently on different screens so on some screens the total width of the content exceeds the width of the div and goes down to a second line, so event setting it as a fixed number of pixels did not work.
How can I set the width of the div so that it automatically expand to fit the content?