title: How do I activate a css style only when that area* of a div goes underneath another div? Possible?
body: <p>Okay so lets say I have div1 &amp; div2 in php.
  Lets say div1 is 10px by 10px.</p>
  
  <p>lets say div2 is 123px by 123px. (may contain image or videos)</p>
  
  <p>When div2 goes directly underneath div 1 (while scrolling down). then the area that div1 covers on div2, turns blue or follows other css styling and only that area, not the whole of div2 gets changed. Apologize for not making sense.</p>
  
  <p>See my illustrations below to get a better understanding. </p>
  
  <p><img src="https://i.stack.imgur.com/v7LNT.jpg" alt="enter image description here"></p>
  
  <pre><code>&lt;html&gt;
  
     &lt;head&gt;
  
       &lt;div id="div1"&gt;
  
       &lt;div id="div2"&gt;
  
     &lt;/head&gt;
  
  &lt;html&gt;
  </code></pre>
  
  <p>Hope Everything made sense. Let's find a solution!</p>
  
  <p>I have tried many solutions, but none that actually work.</p>
  
  <p>Please post full code or a link to where I can test your demo.</p>