-
AuthorPosts
-
December 30, 2024 at 3:27 pm #1474400
There’s that one year old thread, where Nikko posts a suggestion to change the appearance of the menu bar with a .svg
The thread can be seen here:
https://kriesi.at/support/topic/custom-menu-bar-shape/Unfortunately that thread has been closed and more unfortunately Nikko shows as inactive, so maybe he isn’t a member of Enfold Support anymore.
All in all this solution does fit my needs too – besides of the shape of the .svg.
Nikko seems to have used the custom Enfold svg shape “Mountain”. And after you follow his steps in the above mentioned thread, your menu bar looks like this (I coloured it pink to make it stand out for viewing purposes).
Nikko’s solutionI would like to have a curve instead. And I’d like to place the logo inside of it, so that it would be outside of the menu bar.
See mockup of what I would like to reachCould someone please help me with that?
December 31, 2024 at 7:28 am #1474426Hey tribaleye13,
Thank you for the inquiry.
Try to use this SVG code:
<svg width="100%" height="100%" viewBox="0 0 1000 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> <g transform="matrix(1.1286,0,0,0.87034,0,0)"> <path d="M886.053,0L886.053,57.449C886.053,57.449 416.455,49.793 160.672,68.931C64.438,76.132 0,107.545 0,114.898L0,0L886.053,0Z" style="fill:rgb(133,133,133);"/> </g> </svg>
Then add this css code to adjust the position of the logo:
.responsive .logo { position: absolute; left: -50px; right: auto; }
Best regards,
IsmaelDecember 31, 2024 at 1:58 pm #1474434First Question: do you have a shrinking header?
December 31, 2024 at 3:19 pm #1474435@Ismael: Thank you for your svg-Code! When I exchange it with the svg-Code in Nikko’s solution of the old thread I get this result:
https://imgur.com/yYrHK0X
You see your new svg is a tiny stripe below the menu bar now.
@Guenni007: No, my header settings are sticky, but it’s not set to shrink.- This reply was modified 2 weeks ago by tribaleye13.
December 31, 2024 at 4:01 pm #1474437you can see here a possible solution – even with shrinking header. https://webers-testseite.de/tribal/
The clou is – that shape goes to header_bg – so it is part of #header: https://webers-testseite.de/wp-content/uploads/konvexe-boegen.svgthis is the used svg – the right (smaller side) had to be of min-height of shrinked header height.
The Rest of the code used – you can see on my page
PS: for the following section it would be good to have enough top padding
PPS: the svg had to be one that fits to its dimensions: preserveAspectRatio=”none”This is not styled to its end usage ( some adjustings had to be made for responsive behaviour!
January 1, 2025 at 7:27 pm #1474459@Guenni007 Thank you very much for your code and, by the way, Happy New Year!
After I got rid of my hangover today I tried to implement your code and this is really looking like the header I had in mind. Sadly the Logo doesn’t do the same as on your site. It’s not moved to the left but appears in it’s custom position. Does it have to be a .svg?January 2, 2025 at 4:38 am #1474460Hi,
Thank you for the update.
Where can we check the site? Please provide the site URL in the private field.
Best regards,
IsmaelJanuary 2, 2025 at 9:35 am #1474474on your mockup it looks to me if the logo only moves down ( lower than the navigation)
now i looked better to that image – so you have a header with unchecked setting of : “Let Logo And Menu Position Adapt To Browser Window”because i do not see your page – you know better your setting for container width – on my test page it is 1510px
.logo.avia-svg-logo svg { height: 220px; max-height: 175% !important; overflow: visible; top: 10px; left: calc((1510px/2) - 50vw); right: auto; } @media only screen and (max-width: 1509px) { .logo.avia-svg-logo svg { left: 0px; right: auto; } }
btw: – see again test page and code for header_bg – i set in calculated height for it – because this is better to understand how it works. https://webers-testseite.de/tribal/
maybe there had to be adjustments for responsive case in addition.
PS : i think you can have a png as masking image too
https://www.w3schools.com/css/css3_masking.aspUnfortunately, I cannot inspect the page in question. I think I could also help with your query: Link . But without the page it’s just a guess what it might look like. Maybe the link to masking images will help you.
January 2, 2025 at 10:26 pm #1474495@Guenni007 & @Ismael
You’re both completely right – it would make more sense for you to see the actual site instead of screenshots. Wel, it’s just a staging site for test purposes, so I am happy to share the URL with you here:
https://staging-mergel.de
@Guenni007
I tried a lot around with your code and the different values to get the logo positioned right – but I failed because of missing coding abilities. At least I started with Mimo some days ago. Not being able to code sth like this for myself really annoys me ;-).January 3, 2025 at 5:28 am #1474503Hi,
Thank you for the info.
Try to add this css code to adjust the position and size of the logo, and also make sure that it can overflow outside the header container.
div .avia-svg-logo, div .avia-svg-logo a { overflow: visible; } div .avia-svg-logo { float: left; position: absolute; left: 200px; top: 0; z-index: 1; } div .avia-svg-logo svg { height: 140px !important; }
Best regards,
IsmaelJanuary 3, 2025 at 8:14 am #1474510First – seeing your staging page now – your header setting seems to be “Let Logo And Menu Position Adapt To Browser Window”
on your screenshot this is not the case – see navigation ends with content of your page.
So the conditions are a bit different now.btw. your svg isn’t one ;). it is a svg file with an embedded png inside. – so you could neither use a png directly – or try to convert it to a real svg (only vectors inside). f.e: https://webers-testseite.de/wp-content/uploads/MuS.svg
i think the font is an Eurostile Version – the one i used from Bitstream does not fit a 100% – so if you tell me the exact name and font creator – i will find it.…
January 3, 2025 at 8:45 am #1474511with your logo this might work.
remove that one rule :
.logo.avia-svg-logo svg { height: 220px; max-height: 175% !important; overflow: visible; top: 10px; left: calc((1510px/2) - 50vw); right: auto; }
and insert instead:
.logo, .logo a { overflow: visible; } .logo.avia-svg-logo svg { height: 150px; max-height: 200% !important; overflow: visible; overflow: visible; left: -30px !important; top: 5px !important; }
to see my converted svg – look: https://webers-testseite.de/tribal/
Advantage – you can influence inside the svg by external eventsJanuary 3, 2025 at 5:46 pm #1474583Thank you again, @Ismael and @Guenni007 – now it looks exactly like I had it in mind.
And Guenni – thanx for the .svg Service ;-) I quickly did a “rough conversion” of my .png in Illustrator just to have a .svg file because I thought your code needs an .svg to function properly. The logo will change anyways and I have to do a propper .svg file afterwards.
But again: Thank you very much for your help once more! Everytime we have contact in this forum here it’s always funny for me to think about that we’re only eight kilometres apart as the crow flies.
- This reply was modified 1 week, 4 days ago by tribaleye13.
January 5, 2025 at 8:52 am #1474645ok – dann geht es ja auch in deutsch.
Durch die optische Erhöhung des Headers ( du hast 100px eingestellt ) stimmt jetzt das padding-top von #main nicht mehr.
Um es wieder auf die korrekte Distanz zu bringen, kann man die neue Variable (–enfold-header-height) nutzen.Leider kommt dann eine Farbe zum Vorschein, die über das hier gesetzt wurde (rhein_designer.css) :
bitte entfernen, oder eben die Farbe neu definieren – siehe unten#main, .avia-msie-8 .av_header_sticky_disabled#header { background-color:var(--enfold-header-color-bg); }
auch dein Hamburger Background sieht so aus. – schau mal ob es in den Enfold Optionen gesetzt wurde.
.html_header_top.html_header_sticky #top #main { padding-top: calc(var(--enfold-header-height) + 100px) !important; background-color: #FFF; } @media only screen and (max-width: 767px) { .html_header_top.html_header_sticky #top #main { padding-top: 100px !important; } .logo.avia-svg-logo svg { top: 15px !important; } } .html_header_top.html_header_sticky #top.page-id-28 #main { background-color: #b3daa2; } #top .container_wrap { border: none !important; }
January 5, 2025 at 8:53 pm #1474682Hallo Guenni,
das werde ich in Betracht ziehen in der “scharfen” Version der Seite. Das altrosa/pink ist die normale Headerfarbe, die ich damals zum testen im Backend gesetzt habe. So langsam gehe ich jetzt auch von der Testphase zum Bauen über, daher stelle ich die Page jetzt einmal auf Wartung, damit der Googlebot ins Leere läuft.
Vielen Dank noch einmal und ganz sicher bis zum nächsten Mal an dieser Stelle hier. Winken über den Rhein!
@Ismael: The problem I opened this thread for is solved and you can close it from my point of view.January 5, 2025 at 9:12 pm #1474684OK – bis bald dann
January 6, 2025 at 7:02 am #1474701 -
AuthorPosts
- The topic ‘Custom Menu-bar Shape – Part 2’ is closed to new replies.