Click here to Skip to main content
16,015,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Members,

I would like to create a horizontal scrollbar for Ajax Tab Container when tabs overflow. I can create a vertical scrollbar for it but I want horizontal scrollbar instead.

Current Output: (See here: http://i.stack.imgur.com/I4D2r.png[^])

Plan to Achieve: (See here: http://i.stack.imgur.com/bUnK4.png[^])

This is my codes:
HTML
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
   <script>
       $(function () {

           $(".ajax__tab_header").html("<div style='height:80px;width:1200px;' >" + $(".ajax__tab_header").html() + "</div>");

       })
   </script>
   <style>
       .ajax__tab_header {
           height: 40px !important;
           width: 200px;
           overflow: scroll;
           overflow-y: hidden;
       }
   </style>

Question: How to create a horizontal scrollbar, not vertical scrollbar when tabs overflow.
Appreciate if someone can help me on this, thanks a lot!!

Regards,
Felicia
Posted

CSS
{
    overflow-x: scroll;
    overflow-y: hidden;
}

Doesn't work ?

-KR
 
Share this answer
 
Comments
Member 11999641 2-Oct-15 3:35am    
Hi KR, ya have tried this but the overflowing tabs disappeared.
style="overflow:scroll"


CSS
.section
{
 width:500px;
 overflow-x:auto;
}
 
Share this answer
 
Comments
Member 11999641 2-Oct-15 4:28am    
hi, have tried your method but only vertical scrollbar appeared. There is no horizontal scrollbar.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900