Bootstrap: Fixed gutter width in fluid layout?

前端 未结 1 1299
Happy的楠姐
Happy的楠姐 2020-12-23 10:52

I want to have different layouts like [left|content|right] and [left|content] or [content|right] when using the fluid layout the gutter between the \"cells\" is also fluid a

相关标签:
1条回答
  • 2020-12-23 11:28

    Answered a question like this before, what it basically came down too was creating a set of classes to offset the main container depending on how many sidebars you have, like so:

    CSS

    .fixed-fluid {
        margin-left: 240px;
    }
    .fluid-fixed {
        margin-right: 240px;
        margin-left:auto !important;
    }
    .fixed-fixed {
        margin: 0 240px;
    }
    

    Demo, edit here.

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