Tabstrip containing bootstrap columns

后端 未结 3 1201
隐瞒了意图╮
隐瞒了意图╮ 2020-12-15 09:59

I have a Kendo tabstrip and I\'m trying to put two divs with the col-md-6 class side by side inside a tabstrip item. Instead of having 2 columns, they stack on

相关标签:
3条回答
  • 2020-12-15 10:29

    I was experiencing the same issue as OP; however, I am using the Telerik MVC wrappers which already place a k-content class on the tab contents div. Therefore, I implemented Josh's suggestion by reusing the Telerik / Bootstrap classes instead of creating a new class.

    .k-content > .row > *,
    .k-content > .row > *::before,
    .k-content > .row > *::after {
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
    
    0 讨论(0)
  • 2020-12-15 10:31

    This might be more of a 'hack' than a fix, but this is how we got around it

    create a class, lets call it boxFix

    .boxFix *,
    .boxFix *::before,
    .boxFix *::after {
      -moz-box-sizing: border-box !important;
      -webkit-box-sizing: border-box !important;
      box-sizing: border-box !important;
    }
    

    Then for the kendo tab strip

    <div id="tabstrip">
    <ul>
        <li class="k-state-active">
            tab 1
        </li>
        <li>
            tab 2
        </li>
        <li>
            tab 3
        </li>
            Sydney
        </li>
    </ul>
    <div>
        <div class="boxFix">
        <!--bootstrap grids work again-->
        </div>                        
    </div>
    <div>
        <div class="boxFix">
        <!--bootstrap grids work again-->
        </div>                        
    </div>
    <div>
        <div class="boxFix">
        <!--bootstrap grids work again-->
        </div>                        
    </div>
    

    Like I said this is probably more of a hack... but I hope it helps.

    0 讨论(0)
  • 2020-12-15 10:38

    I had the same problem and solved it using http://docs.telerik.com/kendo-ui/third-party/using-kendo-with-twitter-bootstrap#nest-widgets-and-bootstrap-grid-layout

    Here is a working sample http://dojo.telerik.com/@Xavier/iYAW/2

    0 讨论(0)
提交回复
热议问题