Community Forums › Forums › Archived Forums › Design Tips and Tricks › Menu text hamburger icon
Tagged: mobile menu
- This topic has 8 replies, 5 voices, and was last updated 8 years ago by
Amol.
-
AuthorPosts
-
May 16, 2015 at 2:49 am #152380
gversion
MemberHello,
I would like to be able to add the text "MENU" next to the hamburger menu icon that is displayed on mobile devices.
I have tried the CSS below but the "MENU" text is not displayed on the same line as the icon.
<div class="responsive-menu-icon" style=" float: right; width: 100%; "><span class="float:left;">MENU</span></div>
Could someone please give me a hand?
Thank you,
GregMay 16, 2015 at 6:40 am #152388SavvyJackie
MemberHi,
Check your stylesheet and see if you can find the .responsive-menu-icon::before selector and try adding the word MENU just before the hamburger icon code. In this example, we are using dashicons, if you are using font-awesome the hamburger code may be different..responsive-menu-icon::before { content: "MENU \f333"; }
Web Designer and Developer at Savvy Jackie Designs | Lucky with plants | @SavvyJackie
Got your question answered here? Please pay it forward by helping someone else. I’m sure there is at least one question you can answer. 🙂
May 16, 2015 at 6:49 am #152389gversion
MemberHi,
Thanks for the reply. That was easier than I was expecting!
Any idea how I can control the font style of the word "MENU" without changing the hamburger menu icon?
Thanks again, really appreciate it.
Regards,
GregMay 16, 2015 at 7:09 am #152391SavvyJackie
MemberI am not sure, but I would think not without coding it manually in the responsive-menu.js file. You'd have to wrap that 'MENU' word in a separate SPAN tag to style it.
Web Designer and Developer at Savvy Jackie Designs | Lucky with plants | @SavvyJackie
Got your question answered here? Please pay it forward by helping someone else. I’m sure there is at least one question you can answer. 🙂
May 16, 2015 at 7:15 am #152392gversion
MemberOk, thanks. I will try and select it using jQuery. I will post my solution if I find one.
Regards,
GregJuly 4, 2015 at 6:29 pm #158375zomidaily
MemberHi @SavvyJackie
Thanks for pointing out the location. I did add the word MENU, but it seems that the alignment is not same as the icon screenshot: http://prntscr.com/7owjbc Any idea how to correct it?Regards,
JosephJuly 5, 2015 at 1:06 am #158387Amol
ParticipantHello,
Put the following code in your global.js file
$( '.nav-primary .genesis-nav-menu, .nav-secondary .genesis-nav-menu' ).addClass( 'responsive-menu' ).before('<div class="responsive-menu-icon"><span class="menu-text">Menu</span></div>');add following code to your css
.menu-text {
color: #fff;
line-height: 1;
vertical-align: top;
margin-top: 3px;
margin-left: 5px;
display: inline-block;
}I hope this solves your issue.
Warmest
What’s Beneath the Webface
November 12, 2015 at 3:11 pm #170922bvaneijden
MemberKleverk, where can I find the global.js file? It seems not to be there for me.
I am using the Magazine Pro theme and in the "js" folder there is something called "responsive-menu.js". Is this the correct one?
November 12, 2015 at 11:59 pm #170967Amol
ParticipantHello,
Responsive-Menu.js is different file.
Take backup of your website first before creating global.js file
Paste this code in that js file
$( ‘.nav-primary .genesis-nav-menu, .nav-secondary .genesis-nav-menu’ ).addClass( ‘responsive-menu’ ).before(‘<div class=”responsive-menu-icon”><span class=”menu-text”>Menu</span></div>’);
Hope it helps.
What’s Beneath the Webface
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.