how to get div to scroll text horizontally when overflow instead of breaking into new line

This is common on mobile apps. There is a navbar of selectable text options. when they overflow horizontally, they do not break into a new line. instead you scroll horizontally to reach all options.

How can I achieve the above?

>Solution :

You must set to your div

white-space: nowrap //To prevent word breaking
overflow: auto;// To appear scroll

Leave a Reply