문제

I have the following code for Creating Tree using LI
- Problem : when the tree nodes get big more than the screen width the li is breaking to new line for all tree nodes level , so i need to prevent li breaking and makes the page scroll
This is my Code :

[https://jsfiddle.net/naadydev/xq8a3ztz/2/][1] 
도움이 되었습니까?

해결책

Add white-space: nowrap; to the containing ul and change the display of children lis to inline-block; .

Demo http://jsfiddle.net/5CadG/

#list {
    white-space: nowrap;
}
.tree li {
    /* float: left; */ /* REMOVD */
    display: inline-block;
    /* rest of your styles */
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top