ccxwood Posted June 23, 2023 Posted June 23, 2023 (edited) I'm looking to have the third section align dynamically to the bottom of the browser window page open. I'm not looking for it to fix to the bottom of the window but align with it dynamically at page open. Similar to if I was to add this code to the first section: min-height: 100vh !important; height: 100vh !important; https://sartori5.squarespace.com/personal-styling-updated Password:1234 Edited June 24, 2023 by ccxwood Clarified
tuanphan Posted June 25, 2023 Posted June 25, 2023 Add to Design > Custom CSS [data-section-id="6493722ef8b8345b59d4b6ce"] { min-height: unset !important; height: 10vh; } [data-section-id="6493722ef8b8345b59d4b6cb"], [data-section-id="6493722ef8b8345b59d4b6c8"] { min-height: unset !important; height: 45vh; } 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!)
ccxwood Posted June 25, 2023 Author Posted June 25, 2023 1 hour ago, tuanphan said: Add to Design > Custom CSS [data-section-id="6493722ef8b8345b59d4b6ce"] { min-height: unset !important; height: 10vh; } [data-section-id="6493722ef8b8345b59d4b6cb"], [data-section-id="6493722ef8b8345b59d4b6c8"] { min-height: unset !important; height: 45vh; } @tuanphan That is fantastic, thank you. It looks and functions amazing on desktop. How might we also account for the content being mobile responsive to the mobile browser viewport? If found an article that discusses the topic but am unsure of how to apply it to our site. https://dev.to/nirazanbasnet/dont-use-100vh-for-mobile-responsive-3o97
tuanphan Posted June 25, 2023 Posted June 25, 2023 Add this code under /* Mobile */ @media screen and (max-width:767px) { /* First section */ [data-section-id="6493722ef8b8345b59d4b6c8"] { height: 30vh !important; } /* second section */ [data-section-id="6493722ef8b8345b59d4b6cb"] { height: 60vh !important; } /* third section */ [data-section-id="6493722ef8b8345b59d4b6ce"] { min-height: unset !important; height: 10vh; } } 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!)
ccxwood Posted June 25, 2023 Author Posted June 25, 2023 15 hours ago, tuanphan said: Add this code under /* Mobile */ @media screen and (max-width:767px) { /* First section */ [data-section-id="6493722ef8b8345b59d4b6c8"] { height: 30vh !important; } /* second section */ [data-section-id="6493722ef8b8345b59d4b6cb"] { height: 60vh !important; } /* third section */ [data-section-id="6493722ef8b8345b59d4b6ce"] { min-height: unset !important; height: 10vh; } } @tuanphan Would I need to add a javascript solution to account for mobile browser address & navigation bars? For example how the first section https://grailwatch.com/ responds to the actual viewport in ios safari.
tuanphan Posted June 27, 2023 Posted June 27, 2023 You can use add this code under /* Code for iOS @supports (-webkit-touch-callout: none) { /* First section */ [data-section-id="6493722ef8b8345b59d4b6c8"] { height: 20vh !important; } /* second section */ [data-section-id="6493722ef8b8345b59d4b6cb"] { height: 40vh !important; } /* third section */ [data-section-id="6493722ef8b8345b59d4b6ce"] { min-height: unset !important; height: 40vh; } } 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!)
ccxwood Posted June 27, 2023 Author Posted June 27, 2023 4 hours ago, tuanphan said: You can use add this code under /* Code for iOS @supports (-webkit-touch-callout: none) { /* First section */ [data-section-id="6493722ef8b8345b59d4b6c8"] { height: 20vh !important; } /* second section */ [data-section-id="6493722ef8b8345b59d4b6cb"] { height: 40vh !important; } /* third section */ [data-section-id="6493722ef8b8345b59d4b6ce"] { min-height: unset !important; height: 40vh; } } @tuanphan With this code in place the first section now overlaps with the header section. I’ve attached the screenshot. The third section does align with navigation bar nicely though.
tuanphan Posted June 27, 2023 Posted June 27, 2023 2 minutes ago, ccxwood said: @tuanphan With this code in place the first section now overlaps with the header section. I’ve attached the screenshot. The third section does align with navigation bar nicely though. You can adjust number 20 40 40 in the code 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!)
ccxwood Posted June 28, 2023 Author Posted June 28, 2023 @tuanphan Thank you, adjusting the numbers cleaned up the overlapping header. I changed the color of the "scroll down" section to make it easier to discern the section transitions. I realized that the screen shot that showed the overlapped header seemed to show the third section align to the navigation bar but instead it simply expanded it height and the text deceivingly lined up properly. The webkit touch callout code wasn't able to fix the issue. I adjusted the numbers to mimic how I want the page to respond the mobile browser. The screen capture below shows what I hope to have the page function as. Squarespace example 1.MP4
doctorweb Posted July 7 Posted July 7 I have a similar problem. The website is thewilley.com. You can see that on the desktop, the face is shown properly, but on the mobile screen it's cut. I have inserted the code as above, but it still isn't working.
tuanphan Posted July 12 Posted July 12 On 7/7/2024 at 12:14 PM, doctorweb said: I have a similar problem. The website is thewilley.com. You can see that on the desktop, the face is shown properly, but on the mobile screen it's cut. I have inserted the code as above, but it still isn't working. I think it is fine now 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment