How can I style the Top Bar menu on scroll with sticky header?

Hi All
I have a frustrating problem and can't find anything on here to help... I'm doing some mods on a client website (written by someone else) to make it look better on a tablet and, not being very familiar with the depths of Betheme I'm struggling to get the styling on the sticky header top bar menu to work. It's not built using the header builder plugin and i reckoned it would be an easyish CSS tweak, but am struggling. I've managed to figure out how to get the default header to look ok on a tablet (see first pic below) but can't figure out how to do the same on scroll with the sticky header (see second pic below). All I need is some help with the CSS to style the top bar menu when it's sticky (please!)

Thankyou!


This is the header before scolling (ignore the yellow and crushed menu items - that's me playing in CSS trying to work out what I need to do!). The header after scrolling is below

image





this is the header after scrolling:


image

Comments

  • Hello,
    This is because that menu has too many items inserted inside, and when your menu items does not have place to fit, it push them down.
    There are two ways to get rid of it:
    1) Decrease the main menu font size
    2) Use the "Submenu" and push some items inside it.
    Thanks
  • Thanks Pablo I get it and that’s what i managed to do on the header both before I scroll and when sticky BUT whilst I have managed to reduce the padding on the header before scroll for the menu items I don’t seem to be able to do the same when it’s sticky so the menu is too wide and doesn’t format properly when I scroll. So I really just need the correct css as just replacing :not(.isSticky) with .isSticky in the custom css seems to have no effect on the menu padding when I scroll. Hopefully that makes sense?
    Thanks
    Claire
  • I meant I’d already managed to reduce the font size - that probably wasn’t clear!
  • So, do you need further help?
    I'm not sure if you solved the problem or not.
    Thanks
  • Hi - yes, sorted thanks, it was a combination of menu width and font and one or two other things ... 
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.