-
Posts
15 -
Joined
-
Last visited
Reputation Activity
-
lilyweitzman got a reaction from Ziggy in Using CSS to display hamburger menu on desktop and LOGO is now off-center
Thank you to Ziggy for helping me to add the necessary padding to account for the hamburger menu.
//display hamburger menu on desktop
.header .header-burger{display:flex}
.header-nav, .header-actions {display:none}
.header--menu-open .header-menu { opacity: 1; visibility: visible;}
//modify menu font size
.header-menu-nav-item {
line-height: 2em
}
@media screen and (min-width: 768px) {
.header-menu-nav-item a {
font-size: 2vmin;
}
}
//padding to center logo
@media screen and (min-width: 768px) {
.header-title-logo img {
padding-left: 47px;
}}
-
lilyweitzman reacted to Ziggy in Using CSS to display hamburger menu on desktop and LOGO is now off-center
Looking at the website, I don't see the same slight offset of the logo that you're demonstrating in the video, is it only happening when you're logged in?
-
lilyweitzman reacted to EjD in Using CSS to display hamburger menu on desktop and LOGO is now off-center
Looks like the hamburger menu is taking up 47px of space pushing the logo that far to the left. If you add a -47 right margin to the logo it should center (see screenshot).
-
lilyweitzman got a reaction from Ziggy in Using CSS to display hamburger menu on desktop and LOGO is now off-center
Thank you, Ziggy.
This is a development site so we must be logged in to view. URL: https://blackbird-goose-w7ys.squarespace.com/projects