I have structure of :
#navBar {
height: 55px;
width: 40px;
overflow-x:scroll;
overflow-y:hidden;
}
<div id="navBar">
akdhbaIDBhbfbhwhfbaibf
<div style="width: 80; float: left; text-align: center;">
<img src="http://192.168.2.105/SB_Site/icons/Home2.jpg" alt="Nav1" />
<br />
<span style="font-size: 80%">Nav1</span>
</div>
<div style=" width: 80; float: left; text-align: center;">
<img src="http://192.168.2.105/SB_Site/icons/Home2.jpg" alt="Nav2" />
<br />
<span style="font-size: 80%">Nav2</span>
</div>
<div style=" width: 80; float: left; text-align: center;">
<img src="http://192.168.2.105/SB_Site/icons/Home2.jpg" alt="Nav3" />
<br />
<span style="font-size: 80%">Nav3</span>
</div>
</div>
I want that all of the inner divs will scroll-x and not break the line. How can I achieve that?
This will work:
and for HTML part:
No need for
float: left;CSS.