简体   繁体   English

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

[英]Twitter Bootstrap sidebar on the right instead of the left

Default configuration for Twitter Bootstrap sidebar is the left hand side. Twitter Bootstrap侧边栏的默认配置是左侧。 How can I move it on the right ? 我怎么能在右边移动它?

UPDATE: Seems that will be possible with the next release: https://github.com/twitter/bootstrap/issues/333 更新:似乎可以在下一个版本中使用: https//github.com/twitter/bootstrap/issues/333

Just shift the flow of the sidebar to the right, like so: 只需将侧边栏的流向右移,如下所示:

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

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

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

This should work if you're using something like their fluid layout example shown on github. 如果您正在使用github上显示的流体布局示例,这应该可行。

.sidebar
{
    left: auto;
    right: 20px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM