Hamburger menu on mobile site?
scotthunter
Registered Users Posts: 45 Big grins
Hi,
Can someone please provide the CSS code for a simple white hamburger icon in the top left corner of my mobile site, next to the site logo? I need it to expand down like the current one and it needs to clearly display the sublinks without any overlap and text justification to the left. This needs to replace the current grey menu bar so that the slideshow moves up to below the site logo. Can I have seperate code, one for "menu" text below the hamburger, and one without.
www.scotthunterphotography.com
Many thanks
0
Comments
Hey Scott. I am planing to write a tutorial about the menu that I have currently on my SmugMug site http://www.photom.me
The tutorial should be ready in the next few weeks
I managed to find this code from another site. I am nearly there but I want the logo to be left in the middle and the hamburger to be on the left.
.sm-user-ui .sm-page-widget-logo .sm-page-widget-logo-align-left,
.sm-user-ui .sm-page-widget-logo .sm-page-widget-logo-align-right,
.sm-user-ui .sm-page-widget-logo .sm-page-widget-logo-align-center {
text-align: left;
}
.sm-user-ui .sm-page-widget-nav .sm-page-widget-nav-mobile .sm-page-widget-nav-menu-expand a.sm-h5 {
visibility: hidden;
}
.sm-user-ui .sm-page-widget-nav .sm-page-widget-nav-mobile .sm-page-widget-nav-menu-expand a.sm-h5:before {
font-family: 'SmugMug Icon Font Regular';
font-size: 48px;
width: 48px;
line-height: 24px;
content: '\E039 ';
display: block;
visibility: visible;
}
.sm-user-ui .sm-page-widget-nav .sm-page-widget-nav-mobile,
.sm-user-ui .sm-page-widget-nav-mobile .sm-page-widget-nav-mobile-header {
background: none;
}
.sm-user-ui .sm-page-widget-nav .sm-page-widget-nav-mobile .sm-page-widget-nav-menu-expand {
position: left;
top: 0px;/* adjust for your logo */
right: 10px;
z-index: 1;
}
.sm-user-ui .sm-page-widget-logo-text-container {
margin: 10px 0;
}
loooking forward to it
Instagram
Twitter
Looks like it was part of my 'Adding a Hamburger Menu for Mobile in SMugMug' tutorial, but missing a few key steps. Just copy and paste the code from my tutorial. When it says
top: -5px;/* adjust for your logo */
, usetop: -55px;/* adjust for your logo */
instead.That should get you close.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Thanks Mike.
Looks fine now, expect I want the hamburger to be on the left not the right, and I want my site logo to remain in the centre.
Change
text-align: left;
totext-align: center;
;left: 10px;
toright: 10px;
andfloat: left;
tofloat: right;
.Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
It didn’t work unfortunately
Sorry to be a pain, but could you post the amended code in its entirety?
No problem:
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Perfect, thanks
Do you know how to remove the bottom header margin on the mobile site?
What margins. I'm not really seeing any.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
There is a small gap below the H of my logo in mobile phone view when viewed on iPhone. Is there any way of either removing the gap below or increasing the top margin to make it look even?
I read that several times and I looked at the Footer and not the Header. I'll blame it on my stroke...lol!
You can either add
margin-top: 10px
to the top of your logo or removemargin-bottom: -10px
to the bottom or your logo.Find this in your CSS:
Added 10px to the top:
Remove 10px to the bottom:
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
It all looks good now, thanks
Just tried the code from further up, works pretty well. One problem: I have two menu's, one on the header and one on the footer. I'm wondering if there is a way to simply hide the footer menu on mobile? http://qamera.smugmug.com
Thanks in advance!
This should work:
.sm-user-ui .sm-page-layout-region-footer .sm-page-widget-nav-mobile {display: none;}
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Please post your site. Since you are new, you can't post "live links" (clickable), but you can just type it in here.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Jasinspiredart.com
I'm confused. I don't see the hamburger menu on your site. It says the regular SmugMug menu that says 'Menu'. This thread is about the having the hamburger menu icon: https://gallery.imagesinthebackcountry.com/Smugmug-customization/Adding-a-Hamburger-Menu
It isn't about the phone as much as how large the screen is. Devices that are 736px or smaller display the word "Menu".
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Hi Mike,
the hamburger menu works well on my site. Is there a way to not center my links but to align them left and to provide them with a semi-transparent background?
Uwe
www.boruta.digital
You bet. Add this to your Theme's CSS:
You can adjust the opacity
.25
from0
(transparent) to1
(solid).Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Hi Mike, you are great. Thank you for the super quick help.
Uwe
www.boruta.digital
Thanks for the assist!
Create a new thread and post your site.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk