Twitter Bootstrap侧边栏右侧而不是左侧

时间:2012-01-07 14:36:17

标签: html css layout frameworks twitter-bootstrap

Twitter Bootstrap侧边栏的默认配置是左侧。我怎么能在右边移动它?

更新: 似乎可以在下一版本中使用https://github.com/twitter/bootstrap/issues/333

2 个答案:

答案 0 :(得分:7)

只需将侧边栏的流向右移,就像这样:

.container-fluid > .sidebar {
    position: absolute;
    right: 20px;
    top: 0;
    width: 220px;
}

.container-fluid > .content {
    margin-right: 240px;
}

编辑演示http://jsfiddle.net/andresilich/6vPqA/show/

答案 1 :(得分:0)

如果您正在使用github上显示的流体布局示例,这应该可以使用。

.sidebar
{
    left: auto;
    right: 20px;
}
相关问题