TLamo25 Posted February 13 Share Posted February 13 I am trying to align my site header to the left and right edges of the site content below. So far I have been able to get the left side aligned using: .header-title-nav-wrapper .header-title { margin-left: 450px; } But that doesn't seem to work when I replace left and right. Any help would be greatly appreciated! Site is: https://fennel-hawk-mrbl.squarespace.com/ PW: GAU Ziggy 1 Link to comment
Ziggy Posted February 13 Share Posted February 13 You should have more luck if you use percent instead of pixels: @media only screen and (min-width:768px) { .header-title-nav-wrapper .header-title { margin-left: 25%; } } @media only screen and (max-width:767px) { .header-title-nav-wrapper .header-title { margin-left: 0%; } } Since the content width is 50% then 25% margin on the left should work nicely. That's not wat you want on mobile so I've added a media query so the code only affects the desktop version, and the mobile version is at 0%. TLamo25 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
TLamo25 Posted February 13 Author Share Posted February 13 Thank you! but how can I affect the right hand margin so that "selected works" and "about" are aligned with the right hand side of the image? Ziggy 1 Link to comment
Ziggy Posted February 13 Share Posted February 13 Here's some updated code: @media only screen and (min-width:768px) { .header-title-nav-wrapper .header-title { margin-left: 25%; } .header-layout-nav-right .header-nav-list { margin-right: 24vw; } } @media only screen and (max-width:767px) { .header-title-nav-wrapper .header-title { margin-left: 0%; } } Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Solution Ziggy Posted February 13 Solution Share Posted February 13 Though frankly this would be better: @media only screen and (min-width:768px) { .header-width-inset .header-inner { max-width: 900px; width: 50%; } } @media only screen and (max-width:767px) { .header-title-nav-wrapper .header-title { margin-left: 0%; } } Sorry, I misunderstood your first request (that's on me!) TLamo25 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? 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