Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #852741

    Hi Enfoldistas ;-)

    now working with the fifth installation of enfold, I’ trying to get a more individual look of the logo- and menu-header, but now, after hours of trying and searching in this forum, I am at my wit’s end.

    As shown in the pictures below, I try two things:
    A. Moving up the logo to the top and edge of the browser window, and at one go, also over the secondary menu (which is above the main menu).
    B. Flattening the (here: transparent) complete header and navigation bar.

    My Quick CSS is:

    .logo { top: -31px; } 
    .header-scrolled .logo { top: 0; }
    #header_main { z-index: 9999; }
    
    .av_header_transparency .av-main-nav-wrap ul {
        margin-top: -30px; }
    
    .av_header_glassy.av_header_transparency #header_main {
        height: 80px; }

    Screnshots before/after:

    [img]https://i.imgur.com/1kGBSO9.jpg[/img]

    For the eye, it looks as it should. But for functionality unfortunately not: the interactive areas (href clickable / mouse over area – marked blue) I dont’ get in the right position – they only move up without getting flatter.

    Certainly it’s more tricky – and I would be very glad and thankful for any help!
    Best wishes – Stephan

    • This topic was modified 7 years, 2 months ago by Yeti.
    #854119

    Hey Stephan,

    Thank you for using Enfold.

    What do you want to do with the main menu? I’m not sure I understand it based on the screenshot.

    Best regards,
    Ismael

    #854620

    Hi Ismael,

    thanks for your answer. And sorry for any irritation.

    The first / upper screenshot is, what I get in Enfold without changing any codes in QuickCSS or anywhere. In that screenshot I marked, what I want to change:
    a) to push up and place the logo (in fact two square logos together in one png) over the top area called id=”header_meta” until the border of the browser window
    b) to move up the main navigation area (what also entails to make this area more flat), so that the logo overlaps this semi-transparent / glossy area.

    The second / lower screenshot shows, what I want – and also what I got successfully with my Quick CSS. So – for the eye it looks perfect, but it will not work, because the href / mouseover area of the main navigation (in the screenshot marked with a blue border) only moves over the secondary “header_meta” without getting just as flat as visible. In other words: visually I got it, but “physically” not. The physical and functional area for href/mouseover of the mani navigation stays nearly the same as before. Please just open the URL (I wrote in the Privare Content Box), move your mouse over the areas and you will see the problem.

    So my changes with Quick CSS are looking fine, but won’t work. What I am doing wrong?

    Thanks a lot for any idea! Best regards,
    Stephan

    #854673

    Ein live Link wäre schön! So mit screenshots das zu beurteilen ist schwer.
    Ist das auch noch mit Shrink im Header ?

    A Link to live page would be helpful – only from screenshot it is nearly impossible to give any advice

    #854711

    see here: https://webers-testseite.de/yeti

    it is glassy header with (two logos separated – not in one png) shrink option

    these are the css rules for that page ( get rid of page-id class to set it globaly)
    to have normal behavior on smaller screens i put it in a media query

    @media only screen and (min-width:  768px){
    .page-id-29598 #header_meta { z-index: 1 }
    .page-id-29598 .logo img { top: -20px }
    .page-id-29598 .logo, .logo a { overflow: visible }
    #top.page-id-29598  #header_meta { border-bottom: 0 }
    #top.page-id-29598 #header_main { border-top: 0 none }
    }
    #854736

    Hi Guenni,

    that’s a unpublished project preview, and I wrote the link in the Private Content Box, so that no search engine crawls the site. But ok, it’s testdrive.artig.st .

    Thanks for your code; that’s the first step. But I also want the glassy header more flat so the logo protrudes from it / sticks out the glassy area – as shown here:

    As written above, for the eye it looks perfect, but it will not work, because the href / mouseover area of the main navigation won’t get more flat with
    .av_header_transparency .av-main-nav-wrap ul { margin-top: -30px; }
    .av_header_glassy.av_header_transparency #header_main { height: 80px; }

    Thanks for your time and patience – with best regards
    Stephan

    #854817

    the difficulty on that is your option to scroll the header_meta. so you have to make changes in avia.js on function avia_header_size().
    The top margin is a dynamically calculated size – not a static one.

    so the margin-top of the .logo img has to be calculated in this way too! It has to increase from negative header_meta hight ( nearly -30px) to zero when header scrolled was added.

    without the top position at start ( https://webers-testseite.de/yeti ) you don’t have to change this.

    • This reply was modified 7 years, 2 months ago by Guenni007.
    #855099

    now look the example page above – the rest tomorrow!

    #855105

    You’re crazy…

    #855179

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

    #855265

    so first of all it is recomended that you are working with a child-theme. LINK
    second – remove all your settings concerning to this request

    1) you uploaded logo is to small – increase the height to f.e. 300px so it has aprox. 650px width.
    2) create a js folder in your child-theme folder (by the way it is a fix for shrinking header on ipad etc. (mobile) included)
    3) upload the shrink_fix.js to that folder
    Content of the shrink_fix.js: pastebin link
    some comments are the original one some of them should show you what i changed
    4) the line 99 of it is the trick: $(".logo").css("margin-top", "-"+(topbar_height-st_real)+"px" );
    – it only works because we set the logo container to overflow: visible ! on quick css
    5) to load the new js file goto functions.php of your child-theme :

    function include_shrink_fix_js_file() {
       wp_enqueue_script( 'avia-main-child', get_stylesheet_directory_uri().'/js/shrink_fix.js', array('jquery', 'avia-default'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'include_shrink_fix_js_file', 100 );

    6) The quick css code here (some in a media query to save behavior of the logo on small screens (mobile etc.):

    .logo, .logo a { overflow: visible }
    #header_meta {  z-index: 1}
    
    @media only screen and (min-width:  769px){
    /** only if you want to get rid of border-lines */
    #header_meta { border-bottom: 0 !important }
    #header_main { border-top: 0 none !important }
    /** play a bit with this entry  */
    .logo img { max-height: 160% !important}
    /** these settings aren't necessary - but on my installation it looks better  */
    .av_header_transparency .av-burger-overlay .avia-menu-text { color: #000 !important }
    .html_header_transparency .header-scrolled .header_bg { opacity: 0.8 }
    .av_header_transparency .avia-menu-text { color: #fff }
    }
    
    /** to have small screen behavior as usual */
    @media only screen and (max-width:  768px){
    .responsive #top #header .social_bookmarks { display: block !important}
    .logo img { max-height: inherit}
    }

    7) if it is done and something did not look as it should inform me and we will see on your test-installation what to do

    #855276

    maybe it is more looking cool if you got your logo and nav like on header settings:
    header-behavior: Let logo and menu position adapt to browser window. see example page above

    on scrolling the logo does not overlap content on wide screens.

    PPS: it works all fine on my end – BUT. maybe a mod nows why on “shock-scrolling” – sudden fast scrolling the effect is not as it wanted ? Does scroll amount counts wrong on this behavior ?

    #855999

    by the way this shrik_fix.php is the part where the shrink amount is calculated.
    On default – enfold got a shrink amount of 2 ( it goes to the half starting header hight)

    If you got allready now the solution – you can change that too!
    i see on your testpage that header size is set to 75px – what if you want to end at 25px
    see on pastebin shrink_fix.js the lines 62 and 74 – these two lines are responsible for that shrinking behavior !
    on line 74 it is easy to change because this divisor is the relation of starting header height to ending header height : 75/25 = 3 so replace in
    line 74 : <strong>newH = el_height/3;</strong>
    the line 62 is a bit more tricky here it is the realtion of scroll-amount to starting header height – you have to scroll from 75px to 25px = 50px scroll distance – now 75px/50px = 1.5 – and here we have !!!
    replace line 62 : <strong> if(st < el_height/1.5)</strong>

    Now you see that half size destination header height is a special case because scroll-distance to reach the endpoint of shrinking is exactly the endpoint height of the header f.e. from 200px starting to 100px ending you must scroll 100px !
    alot of people fail here because the do not change both factors or they change it to the same value

    • This reply was modified 7 years, 2 months ago by Guenni007.
    #856041

    Dear Guenni,

    I’ll answer later. In the meantime 1000x thanks so much!

    Stephan

    #856274

    Hi Guenni,

    first of all thanks for time and brainpower (= Hirnschmalz ;-)

    I got it, and it runs cool. – With the exeption you wrote about. So certainly also to the moderators::
    In our case the script sets the margin-top to -31px of the .logo over the header_meta topbar. But after having shrinked it calculates the margin-top to various negative values (depending on the speed of scrolling esp.with mousewheel they vary roundabout between -3 and -17px in Chrome, and until -31px in Firefox) although the margin-top value should be scrictly 0px to the window border. Why is the script choking on that?

    And Guenni, also thanks for the explanations with “i see on your testpage that header size is set to 75px – what if you want to end at 25px”.
    As if you didn’t know, I was already thinking about that – but nearly the other way round: I want the header not to big and the shrinked not to flat ;-))
    For example I want the 75 px header shrinked to 50 px, so in the shrink_fix.js I change the value (divisor) in line 62 to 3 and in line 74 to 1.5… and fine ;-)

    Best regards,
    Stephan

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.