简体   繁体   中英

twitter bootstrap navbar fixed to the left?

I am trying to add a navbar like the black navbar that is fixed to the top with

 navbar-fixed-top

but fix I want it to the left of the page. This will be additional to the top navbar. So there will be two navbars one on the top and one on the left.

The left navbar will connect to the top navbar so it will look like there is a border on the left and top.

I have made some hackish attempts but they aren't very good.

What is the best way to do this? Is it possible to use the existing span and row elements or is new css required?

What I had to do was set a fixed height on the top bar, and then also set a fixed position on the left bar. Here is a jsfiddle showing how I did it.

http://jsfiddle.net/whoiskb/GqXdM/embedded/result/

The most minimal CSS to illustrate the point:

the_left_side {
  top:75px; /* the height of the top banner */
  bottom:0px;
  position:fixed;
}
the_main_content {
  position:absolute;
  overflow:auto;
}

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