0

I have this code setup: http://www.bootply.com/RaZJoa1ufg

But when i scroll the transition effect doesn't work, it works, but i need to increase it on both sides, not just one. Could someone help me with this?

Thanks in advance.

MrDikke
  • 157
  • 1
  • 1
  • 10

1 Answers1

3

Change the CSS as follows:

Bootply.com

#navbar-search {
    width: 80%;
}

#navbar-search.affix {
    position: fixed;
    z-index: 10000;
    top: 0;
    width: 100%;
    padding: 0;
    -webkit-transition: width 1s; /* For Safari 3.1 to 6.0 */
    transition: width 2s;
    margin-left: auto;
    margin-right: auto;

    /* ADDED BELOW */
    right: 0;
    left: 0;
}

This also stops the jumping that happened in your example.

Stacker-flow
  • 1,251
  • 3
  • 19
  • 39