Show hide for fix menu with dropdown sub menu

1. Show hide for fix menu without scroll sub menu

2. Show hide for fix menu with scroll sub menu

When a blog is accessed via a mobile or cell phone, which has a sub-menu in the menu label that many blogs are created fixed it can not be entirely visible. Labels that many or long-lined down to the sub menu which turned out to exceed the limits fixed under the phone screen, so do not look for the menu can not be made ​​discroll for fixed or floating.
To give the scroll to the sub menu that has a label that many, simply add the first class on the ul sub menu to a sub menu has a little label (do not want to add scroll) is not affected. For example, with class = 'expand' as in the example below.
<div id='cssmenu'>
<ul>
  <li><a href='/' title='Home'><span>Home</span></a></li>
  <li class='has-sub'><a href='#' title='About This Blog'><span>About This Blog</span></a>
     <ul>
        <li><a href='#' title='About'><span>About</span></a></li>
        <li><a href='#' title='Contact'><span>Contact</span></a></li>
     </ul>
  </li>
  <li class='has-sub'><a href='#' title='More'><span>More Menus</span></a>
     <ul class='expand'>
        <li><a href='#' title='More Menu 1'><span>More Menu 1</span></a></li>
<li><a href='#' title='More Menu 2'><span>More Menu 2</span></a></li>
<li><a href='#' title='More Menu 3'><span>More Menu 3</span></a></li>
<li><a href='#' title='More Menu 4'><span>More Menu 4</span></a></li>
<li><a href='3' title='More Menu 5'><span>More Menu 5</span></a></li>
<li><a href='#' title='More Menu 6'><span>More Menu 6</span></a></li>
<li><a href='#' title='More Menu 7'><span>More Menu 7</span></a></li>
<li><a href='#' title='More Menu 8'><span>More Menu 8</span></a></li>
<li><a href='#' title='More Menu 9'><span>More Menu 9</span></a></li>
<li><a href='3' title='More Menu 10'><span>More Menu 10</span></a></li>
      </ul>
   </li>
</ul>
</div>
Then create a css code for ul sub menu class expand earlier by giving a high (height) that we set and overflow: auto to create his scroll bar. And the sub-menu that has a label usually located at ul second level, so on its use css code 2 pieces ul .
#cssmenu ul ul.expand {height:200px;overflow:auto}

http://www.kompiajaib.com/2014/08/menambahkan-scroll-pada-sub-menu-untuk.html
Share this on Google+ Tumblr

Leave a comment

To insert a link, use tag [url=http://your_link]your-link[/url]
To insert the code , use the tag <i rel="code">your-code</i>
The long code can use the tag <i rel="pre">your-long-code</i>
To insert an image , use the code [img]URL Image[/img]
To insert a title , use tag <b rel="h4">Your Title here...</b>
To creat Bold text <strong>Your text here...</strong>
To create Italic text used tag <em>Your text here...</em>

:) :( :p :D :o ;) 8-) 8:) :/ :'( 3:) O:) :* <3 ^_^ -_- o.O O.o >:o :v :3
Cancel