simoal Posted July 16 Share Posted July 16 Hello I need help in a specific topic. With a piece of CSS Code I made the mobile menu with the hamburger appear on the desktop version. But I want the header button still to appear on the header of the desktop version now that I have the hamburger menu displayed there. the website is: https://fjord-media-lcgf-demo.squarespace.com/ (password: Demo) Thanks a lot! Link to comment
Lesum Posted July 16 Share Posted July 16 (edited) @simoal Hi! You can add this code in Website > Pages > Website Tools > Custom CSS @media screen and (min-width: 1025px) { .header-display-desktop .header-actions.header-actions--right { display: flex !important; } .header-display-desktop .header-actions .header-actions-action.header-actions-action--social { display: none; } } After displaying the button on the desktop version, you can add the following custom code to properly align the elements in the header. @media screen and (min-width: 1025px) { .header-title-logo::after { display: none; } #header .header-display-desktop { justify-content: space-between !important; flex-wrap: wrap; align-content: center; } #header .header-title-nav-wrapper { flex: unset !important; } #header .header-layout-branding-center .header-actions { width: unset !important; } #header .header-actions--right .header-actions-action { margin-left: 0 !important; } } Hope that helps. Edited July 16 by Lesum If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
simoal Posted July 18 Author Share Posted July 18 On 7/16/2024 at 7:34 PM, Lesum said: @simoal Hi! You can add this code in Website > Pages > Website Tools > Custom CSS @media screen and (min-width: 1025px) { .header-display-desktop .header-actions.header-actions--right { display: flex !important; } .header-display-desktop .header-actions .header-actions-action.header-actions-action--social { display: none; } } After displaying the button on the desktop version, you can add the following custom code to properly align the elements in the header. @media screen and (min-width: 1025px) { .header-title-logo::after { display: none; } #header .header-display-desktop { justify-content: space-between !important; flex-wrap: wrap; align-content: center; } #header .header-title-nav-wrapper { flex: unset !important; } #header .header-layout-branding-center .header-actions { width: unset !important; } #header .header-actions--right .header-actions-action { margin-left: 0 !important; } } Hope that helps. Thank you it helped me a lot. But now the Site logo is not in the middle of the header anymore. It is a little bit too far left. Is there any fast code I can use to make it stay in the middle? Link to comment
Solution tuanphan Posted July 20 Solution Share Posted July 20 @simoal Try this CSS code under @media screen and (min-width:1025px) { div.header-title { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) !important; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment