Transparant header overlaying first section

Hi guys,

I hope can count again on your wisdom.

I want to make a transparent header(I have Pro but it’s too much of a hassle to produce it) so want to make it with the regular X theme header. I achieve to produce a solid color header, as the section is still below the header and otherwise, the logo and text can’t be seen. If one scroll, it turns out to be transparent.

But I like to have it the other way around and start with a transparent header(which lays on top of the first section, very important), after which converted to a header with an opacity of let’s say 50%.

I hope you guys can help me out, have been struggling with it for a while now :-).

The current codes used:

JS:

jQuery(document).ready(function($) {
  $(window).scroll(function() {
    var scrollPos = $(window).scrollTop(),
        navbar = $('.x-navbar');

    if (scrollPos > 300) {
      navbar.addClass('alt-color');
    } else {
      navbar.removeClass('alt-color');
    }
  });
});

CS:

.x-navbar {
    background-color: #000000 !important;
    -webkit-transition: all .3s;
    transition: all .3s;
}
.x-navbar.alt-color {
    background-color: transparent !important;
}

.masthead {
    height:0;
  }

@media (max-width:979px){
.x-nav-wrap.mobile.collapse,.x-navbar .sub-menu {
    background-color: #000;
    padding: 20px;
}
}

Hello @Sndr88,

Thanks for writing in!

Be advised that your issue has something to do with customization and it is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

In the meantime, please check out these old threads instead:

Keep in mind that you need to check your custom coding every after WP, theme or plugin updates to make sure that it is still working or that it does not create issues with the site.

Best Regards.

Hi Ruenel,

Thank you for your reply,

I rebuild the header in X theme Pro now and it works like a charm. I only can not find an option to change the transparent header to a more solid color(will determine which #xxxxxx color to follow) on scroll.
Does PRO have an option for this?

Thanks!

Hey @Sndr88,

There’s no option in our header builder to change the color of the sticky bar. This will require custom CSS to do it. Regretfully, providing custom CSS code is outside the scope of our theme support. You may seek 3rd party developers to help you with your problems or you can avail One where we can answer questions outside of the features of our theme.

Thank you for understanding.

That’s quite a pitty as you guys usually gave at least a great answer. I only read that all is outside of the scope of your theme, whereas I see multiple similar questions being answered in a proper way.

Regretting a little going ahead with X theme.

Hi @Sndr88,

There is no such option available in the X. But you can achieve it through the customize Header using the Header Builder which is only available in Pro. I went ahead and created the header by following the below steps.

Step 1: Create a copy of the first bar.
Step 2: Set first bar background color to transparent
Step 3: Make the second bar Hide initially.
Step 4: Make the second bar a sticky
Step 5: Set background color to second bar along with content scrolling off, initial postion set to absolute.

Please find the video below, describing the output.

https://www.awesomescreenshot.com/video/7471829?key=19efce0654fa184f768bc016b5184f4f

If you don’t want to use the Pro, I would suggest you go through the refernce thread provided by my colleague in his post.

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.