startupsmith
startupsmith

Reputation: 5764

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?

Upvotes: 1

Views: 10990

Answers (1)

Kevin
Kevin

Reputation: 1141

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;
}

Upvotes: 7

Related Questions