Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

AThompson_social

Member
  • Content Count

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Here is the solution that a friend helped me out with. IT WORKS I see what you're trying to do. Position sticky is really cool but it can be very finicky sometimes. There are three main factors that need to be present when using position sticky: 1. The direct parent container holding the sticky thing needs to be as long as the area you want the thing to scroll. In this case, that would be the whole column next to your text. 2. The top offset has to be declared, to tell your browser how far away from the top edge it should stick the element. 3. NONE of the parent/ancestor containers of the sticky element can have an overflow different to "visible". If one of them does, then the sticky element won't be able to use the viewport as reference to stick on scroll. That being said, here's what I would do: First, instead of adding position: sticky to the inner div you created (.fact-box) I would add it to the code block itself. It'll basically save yourself some lines of code. Now, because I see you're already using other code blocks in that index section, you can target it by its block ID: #block-yui_3_17_2_1_1595352678571_3802 { position: -webkit-sticky; //prefix for Safari position: sticky; top: 80px; } Then, you need to make the column holding that block as long as the one next to it, otherwise, there'll be no height to scroll through. To achieve that, I suggest applying flexbox to the row holding both columns. That will make them both the height of the longest (i.e. the content side). I wrapped this part inside a media query so that things can still stack on mobile as they do by default. @media screen and (min-width: 640px) { #bcg-content .sqs-row { display: flex; } } Lastly, if you look at the section container (the one with the id of #bcg-content shown in the screenshot) that one has its overflow set to hidden, therefore it's affecting the sticky behavior of the code block. You can swap that for the default value: #bcg-content { overflow: visible; }
  2. This isn't quite what I'm looking for, rather than having something overlap two pages in an index, I'd like the box to stick to the top off the viewport once it arrives there
  3. Site URL: https://www.socialive.us/bcg-case-study Hi all on this page (password ccs) there is an informational box. When you scroll past the hero image i would like that box to stay fixed to the top as you continue to read the other information. I cannot, for the life of me, figure it out. Here are two other pages that have the function I'm looking for https://thirtyeightvisuals.com/blog/resources https://slack.com/customer-stories/zendesk
  4. @tuanphan -I have a question about how you target the row. So I have a hopscotch situation and am anticipating that I have to target each individual one. How do I find the ID that isn't YUI? or is there a way to flip the order of the text and image on only the odd rows? the use cases section of the homepage https://lettuce-grapefruit-bdsr.squarespace.com/ pswd: socialive
  5. Hi pals, I'm working on styling the blog posts and have run into a snag, the navbar covers up the title and then scrolls behind the blog post itself. Any thoughts? Link to site Pswdd: socialive
  6. I have these "hop scotch" sections in my site. On mobile this section looks like garbage because it goes content, image, image, content. Is there anything I can do to make it go image content image content? @lu.diehl @tuanphan https://lettuce-grapefruit-bdsr.squarespace.com/ PSWD socialive
  7. @lu.diehl Thank you so much! this is very helpful. the password is socialive Is there a way to change the color of the nav text instead of just the color of the background? And to trigger the site tile to change to a different version?
  8. this is what I put in and it works for me! /*sticky nav https://forum.squarespace.com/topic/142732-brinekeene-sticky-navigation/#comment-184292*/ Header { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; } // fix mobile nav .Mobile-bar--top { position: fixed; top: 0; left: 0; right: 0; background: #173d56; } .Mobile-bar { position: fixed; z-index: 99999; } // move mobile overlay down .Mobile-overlay-menu-main { padding-top: 80px; }
  9. @ThompsonWebDesign @paul2009 @lu.diehl @colin.irwin @ANI.agency If any of you have any thoughts on this, I would greatly appreciate the help
  10. @tuanphan So I can't get it to trigger a color change. the Page is an index so do I need to put the script in the header of each individual page in the index or just in the header of the index? i've tried both and I can't get it to work. In addition, even when using the script, I can't get the nav to be sticky to the top of the window. I have the nav sticky using the first set of css script in the header <script> // When the user scrolls down 50px from the top of the document, resize the header's font size window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { document.getElementById("header").style.color = "#6ed78f"; } else { document.getElementById("header").style.color = "#173d56"; } } </script> css for making the nav stick to the top of the page /*sticky nav https://forum.squarespace.com/topic/142732-brinekeene-sticky-navigation/#comment-184292*/ Header { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; } // fix mobile nav .Mobile-bar--top { position: fixed; top: 0; left: 0; right: 0; background: #173d56; } .Mobile-bar { position: fixed; z-index: 99999; } // move mobile overlay down .Mobile-overlay-menu-main { padding-top: 80px; } css for the transition color change header{ transition: 0.2s; color: #173d56; }
×
×
  • Create New...