Not able to overwrite the inline style of bm-overlay or bm-menu-wrap
See original GitHub issueI found no way to overwrite the inline style of bm-overlay or bm-menu-wrap.
I have a page like below.
I put the burger menu in the header which has a fixed width and is located in the center.
<div id="outer-container">
<div id="page-wrap">
<div id="header">
<Menu pageWrapId={"page-wrap"} outerContainerId={"outer-container"} >
<a id="home" className="menu-item" href="/">Home</a>
<a id="about" className="menu-item" href="/about">About</a>
<a id="contact" className="menu-item" href="/contact">Contact</a>
<a className="menu-item--small" href="">Settings</a>
</Menu>
</div>
<div id="content">
</div>
</div>
</div>
It shows the menu as below even IsOpen property is false.
I think it happend because of the transform: translate3d(-100%, 0px, 0px)
of bm-menu-wrap.
If I move Menu out of header DIV then it works. but the hurger icon will be out of header as well.
I am thinking to overwrite the bm-burger-button but it is hard to make it look like it’s in header div.
And I am not able to overwrite the translate3d of bm-menu-wrap from CSS as well.
How do I fix it? Am I missing something? Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How can I override inline styles with external CSS?
The only way to override inline style is by using !important keyword beside the CSS rule. ... Using !important is not considered as...
Read more >Override Inline Styles with CSS
Bobby van der Sluis has a nice JS function that avoids inline styles; it's not always possible, especially if using a library.
Read more >How to Override Inline CSS Styles - SitePoint
Read How to Override Inline CSS Styles and learn with SitePoint. Our web development and design tutorials, courses, and books will teach you ......
Read more >How to override inline styles with external in CSS
In some circumstances, we have to do the opposite. We have to override the inline CSS which has come from foreign sources and...
Read more >How to Override Inline CSS Styles - CSSDeck
Usually, this means spending a significant amount of time combing through old (hopefully not unorganized) code to manually delete the inline styling, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm ok. If you wanted to link me your code somewhere I can run it, I’m happy to take a look at why this is necessary. I think there’s probably a simpler way to get around this, but glad you found a solution for now 😃
I found another way around this. I changed the value of the translate3d inside baseStyles.js from -100% to -110% in the menuWrap function. Just sharing…