Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #1325276

    Hi all,
    I am trying to build a one-page website with Enfold and am having trouble getting the transparent header to work.
    Basically, it is a black bar even with the page settings set to transparent header. I have spent hours trying to figure out which setting I have set wrong and can’t figure it out.
    Ideally it would be transparent when it first loads, then would switch to black background when user scrolls down (current behavior).

    Admin login credentials in private content.

    Thank you!

    Rob

    #1325279

    Hey goldengate415,
    Thank you for the link to your site, your header is transparent, but the slider shortcode is not at the top of the page under the header so the black you are seeing is the body background color, try adding this css to move the slider up so it will show through the header:

    #top.home .n2-ss-no-bga-fixed {
    	top: -88px;
    }

    By the way, this negative height is automatically added for color sections & the layerslider when a transparent header is used, not that this helps your situation, but it may explain why you have not noticed this before.

    Best regards,
    Mike

    #1325280

    Thanks, Mike, that works great and works on mobile too! ( I was worried it might mess up mobile…)
    A couple more questions before we close the ticket:
    1. Is there code to make the mobile header background header transparent on first load? on scroll?
    2. This one is a lot harder and I don’t think it has a solution…. is there a way that the website header can wait to load until after the first splash screen / slide on the slider… perhaps a delay load of x seconds for the initial header?

    Thanks,
    Rob

    #1325281

    3. and one more question… the current hamburger menu only has two items… they are pretty far down the menu.. how do I move them up?

    #1325318

    Hi,
    Glad to hear this helped, for mobile you may want to use this:

    @media only screen and (max-width: 767px) { 
    	#top.home .n2-ss-no-bga-fixed {
        top: -130px;
    }
    }

    to make the mobile header background header transparent on first load, try this:

    @media only screen and (max-width: 989px) {
    .html_mobile_menu_tablet #top #wrap_all #header.av_header_transparency {
        background-color: transparent;
    }
    }
    

    on scroll the header will turn black, if you want it to stay transparent use this instead:

    @media only screen and (max-width: 989px) {
    .html_mobile_menu_tablet #top #wrap_all #header.av_header_transparency,#header.header_color .header_bg {
        background-color: transparent;
    }
    }

    to delay the header by 8 seconds (after your splash screen) Try adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function delay_header() { ?>
        <script>
    (function($) {
    	$("#header").css({'opacity':'0'});
    	setTimeout(function(){
    	$("#header").css({'opacity':'1'});
    	},8000);
    }(jQuery)); 
    </script>
        <?php
    }
    add_action('wp_footer', 'delay_header');

    to move your menu items up try this:

    #top #header_main #av-burger-menu-ul {
        vertical-align: top;
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1325320

    Hi Mike!
    Thanks for all of that code. On the dekay header in functions.php, I’m getting this error:
    Your PHP code changes were rolled back due to an error on line 21 of file wp-content/themes/enfold-child/functions.php. Please fix and try saving again.

    syntax error, unexpected ‘?’

    Here’s line 21:
    function delay_header() { ?>

    thanks,
    rob

    #1325322

    One more thing… can you give me the css or function.php to make the initial header the “shrunken header on scroll” size?

    Thanks!
    Rob

    #1325323

    Hi,
    Thanks, I’m not sure about your error, perhaps your clipboard added something, I added the script to your functions.php with no error, and it seems to be working, please check.

    Best regards,
    Mike

    #1325324

    My mistake… I copied the code from the email instead of the forum… rookie mistake from someone who has been Using Enfold since 2016… LOL

    Also I think our responses crossed, but wanted to make sure you saw:
    “One more thing… can you give me the css or function.php to make the initial header the “shrunken header on scroll” size?”

    Thanks!!
    Rob

    #1325325

    Annnnnd I hate to ask but can the delayed header be only for ipad / desktop sizes?

    Thanks so much,
    Rob

    #1325326

    Hi,
    Thanks our responses did cross, instead of adding more to achieve this lets set the header with these settings, I un-checked Enfold Theme Options ▸ Header ▸ Header behavior ▸ Shrinking Header and changed Enfold Theme Options ▸ Header ▸ Header Layout ▸ Header Size ▸ custom pixel value of 46px, which was the size after scroll. Please check.

    Best regards,
    Mike

    #1325328

    Thanks Mike, that works! And can the delayed header be only for ipad / desktop sizes?

    #1325330

    Hi,
    I changed the script to this:

    function delay_header() { ?>
        <script>
    (function($) {
    	var width = $(window).width()
    	if ((width >= 768)) {
    	$("#header").css({'opacity':'0'});
    	setTimeout(function(){
    	$("#header").css({'opacity':'1'});
    	},8000);
    	} else {}
    }(jQuery)); 
    </script>
        <?php
    }
    add_action('wp_footer', 'delay_header');

    please clear your browser cache and check.

    Best regards,
    Mike

    #1325343

    Thanks Mike… the above code for keeping header transparent on scroll stopped working… I’m wondering if above change means we need to change this:

    @media only screen and (max-width: 989px) {
    .html_mobile_menu_tablet #top #wrap_all #header.av_header_transparency,#header.header_color .header_bg {
    background-color: transparent;
    }
    }

    Thanks,
    Rob

    #1325383

    Hi,
    the media query @media only screen and (max-width: 989px) { says that this rule will only work below 989px, I don’t recall why were doing that but to have the transparent header for all screen sizes please remove it and the last braket like this:

    .html_mobile_menu_tablet #top #wrap_all #header.av_header_transparency,
    #header.header_color .header_bg {
        background-color: transparent;
    }
    

    Best regards,
    Mike

    #1325462

    Thank you!! Final question…
    css to center logo on mobile only please?
    I searched and found the below but it does not do anything…

    .responsive #top .logo,.responsive .logo img { width: 100%; }

    Thanks,
    Rob

    #1325479

    Hi,
    Please try this:

    @media only screen and (max-width: 767px) { 
    .responsive #top .logo,.responsive .logo img { 
    	width: 100%; 
    	margin: auto;
    }
    }

    Best regards,
    Mike

    #1325722

    Hi,
    Did this work for you? Shall we close this then?

    Best regards,
    Mike

    #1325764

    YES… thank you Mike for all your help on this….. Enfold and Enfold support continue to be best in class!

    Thanks much,
    Rob

    #1325785

    Hi Mike… we just went live with the website and for some reason some of the styling on the menus has gone a little crazy. So glad you didn’t close this yet. I’m wondering if some of the custom css and advanced settings (under enfold settings) are fighting with each other? Can you log in to the site and take a look? (new credentials below).

    The specific issue right now is that as you scroll down, the anchor link areas (about and contact) become larger on the compressed menu bar at the top (desktop) as you pass each anchor. And then when you go back up to the top they don’t get small again. I would prefer that they just remain the same size as user scrolls down. I don’t think I changed a setting that would affect this but I did change hover font size and color in advanced settings.

    Thanks much! And sorry to keep prolonging this thread… I really appreciate your help and I think we are at the finish line.

    Rob

    #1325809

    Hi,

    Thank you for the update.

    In the Enfold > Advanced Styling , the font size of the active Main Menu Links was set to to 26px. We have reset it back to default, which is 18px.

    Best regards,
    Ismael

    #1325928

    I don’t know how I missed that… long day. Thank you so much. OK to close this thread. Thanks all for amazing Enfold support as always!
    This reaffirms why I told my friend to select Enfold when he wanted me to build a site for him. It’s still the best support and functionality out there!

    Thank you again,
    Rob

    #1325974

    Hi Rob,

    No problem! Thank you for recommending the theme and for the continued support. Please let us know in a different thread if you need anything else.

    Have nice day.

    Best regards,
    Ismael

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Cannot get transparent header to work’ is closed to new replies.