简体   繁体   中英

Twitter Bootstrap sidebar on the right instead of the left

Default configuration for Twitter Bootstrap sidebar is the left hand side. 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

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/

This should work if you're using something like their fluid layout example shown on github.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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