Is it possible to display the notification bar with shortcode?
-
Hi, I am having trouble with making notification work with sticky header. It is working normally with regular header, but notification bar is overlapping the sticky header, it is not a z-index issue because I need notification bar to push sticky hearder down so they are one below another but it can’t push it because both are “position: fixed”
I am using Elementor.
I can add “top: 70px” for example on my sticky header, and there is a room for notification bar above and they are not overlapping, but there is an issue – if there is a cookie active, and notification bar should not appear that “top: 70px” CSS will stay anyway, and my sticky header will move down even there is no notification bar.
So, I was thinking to add notification bar as a shortocde to sticky header.
I’ve tried using “Theme Sticky Selector” but I could not achieve anything with that.
Or maybe notification bar should get a new class if theres is a cookie active and if it is not going to appear for example “notifciation-bar-disabled”, then I think I could check with jQuery if that class exists, and if exists, if I know that the bar will appear, only then add “top: 70px” to my sticky header.
Or maybe you have another idea? Please let me know. Thank you in advance
- You must be logged in to reply to this topic.