Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #1125732

    Hello
    I have a dev site that has a long horizontal landscape logo, which I’d like to have fill the entire #header_main area. I suppose I could make it a background image but want it to scale nicely to mobile and always fill the entire space. Please advise and thank you in advance :)

    #1125816

    Hey webWahine,

    Please try the following in Quick CSS under Enfold->General Styling:

    .html_header_top.html_logo_center .logo {
        left: 0;
        -webkit-transform: translate(0,0);
        -ms-transform: translate(0,0);
        transform: translate(0,0);
    }
    
    .html_header_top #top .av_header_stretch .container {
        width: 100%;
    }

    Best regards,
    Rikard

    #1126070

    Hello, Rikard
    thank you, but it’s didn’t change anything. Please advise. Thanks again! :)

    #1126171

    Hi,

    Select to delete the old CSS and JS files under Enfold->Performance.

    Best regards,
    Rikard

    #1126349

    Ok, it sort of worked. I realised that in performance I had the css and js merged, and I’m using a child theme so I couldn’t see the changes, but now I can.

    Now the logo is full height and full width, and I added in sizing since I’m using an svg –

    .html_header_top.html_logo_center .logo {
        left: 0;
        -webkit-transform: translate(0,0);
        -ms-transform: translate(0,0);
        transform: translate(0,0);
    	width: 100% !important; /* required for svg */
    	height: auto !important;
    }

    The main menu, below, is now lying over top of the logo – I’m guessing that the main menu needs to have some css change to positioning, eg, relative, to make it sit properly, since setting a custom height would not be responsive, based on this code?

    Also, the logo is not full width and height on mobile, so I need help with that as well, please :)

    #1128158

    Hi,

    Background images when set to cover the entire area will scale or contain.

    When you contain the image the whole image will be visible but there will be gaps on different screen size.

    If you set it to cover then some parts of the image won’t be visible.

    If you can only include the lines in the svg image and apply the gradient as header background I think this issue can be resolved :)

    Best regards,
    Vinay

    #1128277

    Thanks, vinay, I will try that, however, that doesn’t address the issue if the position of the main menu on top of rather than underneath the header logo. Could you please send me some cash to correct that.

    #1128278

    Meant to say css. Auto correct, sorry.

    #1128279

    Also, I’m not quite sure how to set the css as per your suggestion, vinay. Could you please send code for setting the background to cover the entire area, plus css the logo without the gradient. Thanks!

    #1128787

    Hi,

    Thank you for the update.

    Can you give us a screenshot of the issue? The following css modification applies a minimum height to the header container creating a huge black space underneath the logo.

    
    .responsive.html_mobile_menu_tablet #top #wrap_all .av-logo-container {
        padding: 0px !important;
        background: #000 !important;
    }
    

    *side note: In the about page we found this unused shortcode.

    [envira-gallery id=”257″]
    

    Best regards,
    Ismael

    #1129024

    I’ve removed that mobile css with the min height – it was copied from another site and this is still very much a work in progress!
    Same for the About page – I’m rebuilding each page to remove the old Envira shortcodes and replace with your masonry gallery.
    The main menu needs to sit properly, so below the header logo, not inside it. the mobile needs to be full width and height with a burger centered below.
    I could fiddle and hide the header and use a fullwidth image and a secondary menu for the main pages but everything generated from searches or single post pages still need a proper logo, so that’s not a great option, since it’s a blog site.
    Here are two screenshots. the first is the desktop and the second is mobile.

    Main menu needs to be below the header logoMobile header logo needs to fill space with burger centered below

    Thanks again! :)

    #1129424

    Hi,

    Thank you for the update.

    This should set the logo image to cover the header container and center align the main menu.

    @media only screen and (max-width: 767px) {
      .responsive #top #wrap_all .av-logo-container {
          width: 100%;
          max-width: 100%;
      }
      
      .responsive .logo a {
          background: url(https://dev.latitude65.ca/wp-content/uploads/2019/08/Latitude65logo.svg) no-repeat;
          background-size: cover;
          background-position: center center;
      }
      
      .responsive .logo img {
          display: none !important;
      }
      
      .responsive #top #wrap_all .main_menu {
        left: auto;
        width: 100%;
        right: auto;
      }
    
      .responsive #top .av-logo-container .avia-menu {
        margin: 0 auto;
        float: none;
      }
    
      .responsive #top .av-main-nav .menu-item-avia-special {
        display: block;
        left: 50%;
        transform: translateX(-50%);
      }
    }

    Please don’t forget to toggle the Performance > File Compression settings after adding the modification. Or better yet, just disable it and the rest of the cache plugins temporarily while you’re building the site.

    Best regards,
    Ismael

    #1129692

    Thank you! Almost there! I added in some vertical spacing for the burger as it was sitting centered over top of the logo/background, so I added this for the header height –

        .responsive #top #wrap_all .av-logo-container {
             width: 100%;
             max-width: 100%;
    		 margin-bottom: 80px !important; /* adjust as required */
         }

    And this for the burger –

         .responsive #top .av-main-nav .menu-item-avia-special {
           display: block;
           left: 50%;
           transform: translateX(-50%);
    	   margin-top: 80px !important; /* adjust as required */
         }

    So, all that is left is how to fix the main menu placement on the desktop version, please :)

    #1130787

    Hi,

    Sorry for the delay.

    You can adjust the vertical position of the menu container with this.

    #header_main_alternate {
        z-index: 2;
        top: -25px;
    }
    

    Thank you for the update.

    Best regards,
    Ismael

    #1131086

    Sorry, but that didn’t work at all. The main menu is still placed directly over the vertical middle of the header logo, the breadcrumbs are still hidden underneath when the header loads, as well as a top portion of each page. I’m hoping that you can help me resolve this soon. If there was an easy way to place a fullwidth easy slider above the header area on every page, that would solve the issue, but I think that’s not possible?

    #1131662

    Hi,

    Thank you for the update.

    Have you tried setting the Enfold > Header > Menu and Logo Position to “Logo center, Menu below”? This should move the menu below the header.

    Best regards,
    Ismael

    #1131694

    can i see your dev site ? its password protected.

    #1131720

    Thank you, Ismael, but it’s been set to that since the beginning, and the menu is still sitting over the header logo.

    Guenni007 – since you are not a moderator how do I send you the password, please?

    #1131721

    I’m adding in the admin login so you can have a look as well :)

    #1131798

    all my details are on my Nick and Avatar
    I also don’t think I can contribute anything else to the final code here from Ismael – maybe a different approach to solving and looking at the svg code. Maybe you can also optimize it.
    svgs can also be forced within their code to have a decided exterior behavior.

    F.e. an enable background option in svg is sometimes not the best solution – and a
    preserveAspectRatio=”xMinYMid meet” in the svg header-section could be best if you like to shrink to the middle etc. pp. – this could help to make the css code simpler.
    See here how the logo reacts with only inline parameter change: https://webers-testseite.de/Latitude65logo.svg

    or can you live with this behaviour ( height stays at a given value – centered Logo but – borders run out on left and right: https://webers-testseite.de/Latitude65logo2.svg

    • This reply was modified 5 years, 3 months ago by Guenni007.
    #1132051

    Guenni007, the second option is perfect!!!!!

    Quite frankly, it’s a very problematic logo on numerous levels, especially on screen! It’s much too panoramic so looks lost on mobile when the entire logo fills the top space. Since it’s also full of fine lines and a gradient, that all tends to get muddled. While the idea of the radiating bands is lovely, it’s really a print piece.

    Thank you so much for the input! Could you please send me the css to apply your second option :)

    https://webers-testseite.de/Latitude65logo2.svg

    #1132111

    no css – it is just in the svg code

    you can open each svg in a goog text-editor ( Mac: Sublime text / Win : notepad++)
    on top there is the “header” info – i just changed that info in your svg to:

    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
    	 width="100%" height="300px" viewBox="0 0 1139.7 133.1" preserveAspectRatio="xMidYMin slice" xml:space="preserve">

    if you upload that new svg to your site – maybe with this svg it is easier to find a css solution for your header!
    but you can download that svg from above.

    #1133521

    Sorry for the lengthy delayed response! Now it’s perfect on desktop but I want it to be the same behaviour on mobile, ie, 300px high and cropped as you scale down, but with the burger centered, below. So I’d like to keep the logo 300px high, consistently, on all devices – cropping left and right is fine.

    I had no idea that you could change the parameters for the svg with an editor! thank you, guenni007! I’ve edited the svg file, loaded it, and changed my custom height to 300px, so now the main menu is perfect on desktop! I also added in sizing for the image to make the svg show up –

    
    .html_header_top.html_logo_center .logo {
        left: 0;
        -webkit-transform: translate(0,0);
        -ms-transform: translate(0,0);
        transform: translate(0,0);
    	width: 100% !important; /* required for svg */
    	height: auto !important;
    }
    
    .html_header_top #top .av_header_stretch .container {
        width: 100%;
    }
    
    .header_color img {
    	width: 100% !important; /*required for svg */
    	height: 300px !important;
    	margin: 0px !important;
    	padding: 0px 0px 0px 0px !important;
    }

    I removed the old css styling for mobile and simply copied the desktop css again to keep it exactly the same but now it’s defaulting to a long band of the entire logo with white space at a smaller breakpoint, and the burger is not below.

    Here’s what I have for under 990px –

    	/* logo */
    
    	.html_header_top.html_logo_center .logo {
    	    left: 0;
    	    -webkit-transform: translate(0,0);
    	    -ms-transform: translate(0,0);
    	    transform: translate(0,0);
    		width: 100% !important; /* required for svg */
    		height: auto !important;
    	}
    
    	.html_header_top #top .av_header_stretch .container {
    	    width: 100%;
    	}
    
    	.header_color img {
    		width: 100% !important; /*required for svg */
    		height: 300px !important;
    		margin: 0px !important;
    		padding: 0px 0px 0px 0px !important;
    	}
    		
    	/* burger */
    	
        .responsive #top #wrap_all .main_menu {
          left: auto;
          width: 100%;
          right: auto;
        }
    
        .responsive #top .av-logo-container .avia-menu {
          margin: 0 auto;
          float: none;
        }
    
        .responsive #top .av-main-nav .menu-item-avia-special {
       		display: block;
        	left: 50%;
       		transform: translateX(-50%);
       		margin-top: 80px !important;
        }
     
     
       	/* burger closed */
    
       	.header_color .av-hamburger-inner,
       	.header_color .av-hamburger-inner::before,
       	.header_color .av-hamburger-inner::after {
       		background-color: #666 !important;
       	}
     
           /* burger open */
    
       	#top .header_color .is-active .av-hamburger-inner, 
       	#top .header_color .is-active .av-hamburger-inner::before, 
       	#top .header_color .is-active .av-hamburger-inner::after {
       	    background-color: #000 !important;
       	}
     
     
    

    Thanks again for your help! :)

    #1134347

    Hi,

    Thank you for the update.

    You can add this inside one of the css media query for mobile view.

    .responsive #top #wrap_all .av-logo-container {
    	width: 100%;
    	max-width: 100%;
    }
    
    .responsive .logo img {
    	height: 80px !important;
    }
    
    .template-page.content {
    	padding-top: 80px;
    }

    It should result to this.

    Screenshot: https://imgur.com/a/EPEgOjL

    Best regards,
    Ismael

    #1135467

    That’s perfect! Thank you so much :))))

    #1135579

    Hi,

    Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Please bookmark Enfold Documentation for future reference.
    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘Svg logo full width and full height of header centered above menu’ is closed to new replies.