You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a modal, where the page contains a sticky navbar with a container inside it, the container gets shifted slightly to the left due to the padding being applied to the body element.
The .sticky-top element gets a right-padding of 33px added, however there is also white space to the right of this due to the padding on the body. The .sticky-top element should also have a margin-right of -33px applied to compensate for this.
I think that when PR #18441 was submitted, it maybe wasn't tested with .sticky-top (only .fixed-top) and so this is why the problem is still sometimes occurring. I checked the source of the JS file I'm using and found that it does contain code from this PR.
Edit: checked to confirm the problem is only occurring with sticky-top (not fixed-top).
As much detail as possible for what we should add and why it's important to Bootstrap
Relevant links to prior art, screenshots, or live demos whenever possible
The text was updated successfully, but these errors were encountered:
vtenfys
changed the title
Fixed navbar with container being shifted slightly to the left upon modal opened
Sticky navbar with container being shifted slightly to the left upon modal opened
Aug 24, 2017
* Adjust margin for sticky elements on modal
Previously white space was visible to the right of sticky elements due to right padding being added to the body. This fixes#23661.
* Add unit tests for margin of sticky elements on modal
Link to demo: https://jsfiddle.net/techdavid/g89ts0rs/1/
When opening a modal, where the page contains a sticky navbar with a container inside it, the container gets shifted slightly to the left due to the padding being applied to the body element.
The
.sticky-top
element gets a right-padding of 33px added, however there is also white space to the right of this due to the padding on the body. The.sticky-top
element should also have a margin-right of -33px applied to compensate for this.I think that when PR #18441 was submitted, it maybe wasn't tested with
.sticky-top
(only.fixed-top
) and so this is why the problem is still sometimes occurring. I checked the source of the JS file I'm using and found that it does contain code from this PR.Edit: checked to confirm the problem is only occurring with sticky-top (not fixed-top).
Before opening an issue:
When asking general "how to" questions:
When reporting a bug, include:
When suggesting a feature, include:
The text was updated successfully, but these errors were encountered: