- This topic has 14 replies, 2 voices, and was last updated 4 years, 5 months ago by David.
-
AuthorPosts
-
October 26, 2019 at 4:45 pm #1045535Jason
Hi
I am attempting to add html elements to mobile header using a hook at inside_mobile_header with the following code:<style type=”text/css”>
.inside-fixed-mobile-footer {
margin:auto; border-width:1px}
.book{padding:5px}
</style>I remove header logo with the intention of having 4 buttons plus hamburger option in a horizontal line.
However the buttons all stack vertically on the left with the hamburger menu on the right. Is there a way to stack them evenly horizontally across the mobile header?October 26, 2019 at 6:02 pm #1045562DavidStaffCustomer SupportHi there,
try wrapping your <i> elements in a span tag:
eg. <span><i class=”fa”></i><i class=”fa”></i><i class=”fa”></i><i class=”fa”></i></span>
If not can you provide a link to the site so i can take a look?
You can edit your first post in this topic and use the Site URL field to share privately.October 27, 2019 at 5:20 am #1045718JasonHi,
Thanks I tried span but it didn’t work. I have managed to get them side by side using flex box, however they appear bunched up on a box on the left. My goal is to essentially have them evenly spaced across the full width (as button or simple fa icon) with the hamburger menu even in the 5th space ie 5 icons evenly spaced across the screen. Essentially this is what I’m trying to create (https://www.bnecreative.com/products/navbar/). I’m not sure if this is doable.
I’m assuming there is no easy way to integrate the hamburger menu as it stands with my html (ie create a fixed bar with a link that calls the off-canvas menu) with recreating the code from scratch (out of my league)?October 27, 2019 at 7:54 am #1046033DavidStaffCustomer SupportTry replacing your CSS with:
.inside-fixed-mobile-footer { flex: 1 0 80%; align-items: center; display: flex; } .inside-fixed-mobile-footer div { flex: 1 0 25%; display: flex; justify-content: center; } #mobile-header .mobile-bar-items { flex: 1 0 20%; }
October 27, 2019 at 8:42 am #1046079JasonHi thanks! You have sent me a whole lot closer! I made a few other changes to get it close to my desired outcome.
I’m stuck on having the menu icon out of alignment with the rest, can you help me balance that out at all?October 27, 2019 at 4:32 pm #1046269JasonChanged to this which fixed the spacing
#mobile-header .menu-toggle {
flex: 1 0 20%;
}I am struggling to get the bars to change color when hovering over menu-toggle (only works over menu bars) – any ideas?
October 28, 2019 at 2:09 am #1046470DavidStaffCustomer SupportAre hover colors important considering hover doesn’t work on mobile devices ?
October 28, 2019 at 4:27 pm #1047305JasonHi David,
No not essential, but nice – especially in use cases where people use browsers minimised at side of screen. I’m not going to lose sleep over it, but if there was an easy way to make them all consistent then I’d take it! I appreciate all your helpOctober 29, 2019 at 3:16 am #1047550DavidStaffCustomer SupportAah ok – sorry i didn’t spot the issue first of all – give this a shot:
.menu-toggle:hover .gp-icon svg { fill: #fff; }
October 29, 2019 at 4:59 am #1047621JasonWorks perfectly!
Now the last bit to push my luck which you can see on the test page. I have added the word ‘menu’ using
.menu-toggle::after {
content: “\A menu”;}
But am struggling to get it to display under the 3 bars
Don’t suppose you have magic up your sleeve for that?!October 29, 2019 at 9:10 am #1047950DavidStaffCustomer Supportgive your CSS a
display: block;
property.October 29, 2019 at 9:34 pm #1048419JasonThanks! That would have been obvious had I been smarter!
Trying to get the space between those bars and text to match the space between other icons and text is a different challenge now! Whenever I increase the space using padding to the ::after element it creates a larger container and pushes the icon higher out of alignment with the rest. Am I targetting the wrong thing?October 30, 2019 at 5:02 am #1048609DavidStaffCustomer SupportTry editing this CSS to include the two properties i have included:
.menu-toggle::after { display: block; content: "menu"; color: #ff7518; font-size: 0.5em; /* Add the following properties */ line-height: 1; padding-top: 0.8em; }
October 30, 2019 at 7:32 pm #1049291JasonThanks David, your support and suggestions have been spot on and educational. I have managed to create what I set out to achieve!
October 31, 2019 at 5:18 am #1049503DavidStaffCustomer SupportHappy to hear that 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.