I've been using the reactstrap
library and following this guide:
In the example provided, the
<nav className='ml-auto' navbar>
is pushing the <NavItem>
to the right. However, in my implementation (which is very similar to the example), the <NavItem>
is appearing right next to the <NavbarBrand>
.
I have reviewed the syntax numerous times, and it appears to be correct. The small amount of custom CSS I have does not seem to be overriding anything. The CSS in the console seems quite similar and seems to be influenced by:
.ml-auto, .mx-auto {
margin-left: auto!important;
}
Disabling it in the console on the example site moves the <NavItem>
next to the <NavbarBrand>
, resembling how it looks in my application (which is not desired). Here are the visuals for comparison:
Reactstrap Example (correct spacing):
https://i.sstatic.net/hGrRQ.png https://i.sstatic.net/Y0MmQ.png
Console for my app (incorrect spacing): https://i.sstatic.net/DMyD3.png https://i.sstatic.net/4S3NJ.png
How can I achieve the correct spacing in my application?
The reason why margin-left: auto !important
works in one scenario and not the other is unclear to me.