html - How to force div element to keep its contents inside container -


i making css menu. using ul. when make li float left lis gets outside of ul. mean height of ul become zero. how can make li display inside ul after giving float left.

one way make div tag common class , add clear: both in css not want this. need better solution. please

just add overflow: auto; <ul>. make text doesn't leak outside of ul.

see: http://jsfiddle.net/6ckag/


however, depending on you're doing, might easier make <li> display: inline;. totally depends on you're doing!

see: http://jsfiddle.net/k7wqx/


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -