How to scroll up a div when hovering over another element

Learning to Code

I have an absolute div that is behind my footer. When I hover over another element (#snapchat) I want that absolute div to scroll up from behind the footer and stop above it where it can be seen. How would I do this?

.snapcode-footer { 
  position: absolute;
  padding-top: 20px;
  text-align: center;
  left: 0;
  right: 0;
}

.sub-sub-footer {
  position: relative;
  z-index: 1;
  background-color: #F7F7F7;
  padding-top: 35px;
  padding-bottom: 20px;
}

.sub-footer {
  position: relative;
  z-index: 1;
  background-color: #edeeef;
  margin-top: 0px;
}
<div class="snapcode-footer">
<img src="https://wumbo.com/wp-content/uploads/2016/11/snapcode.png" width="250px" height="auto" alt="Scan to add us on Snapchat!">
</div>

<div class="sub-sub-footer">
 <ul class="social-footer">
    <li id="twitter"><a href="https://www.twitter.com/wumbo" target="blank"><img src="/wp-content/uploads/2016/11/Twitter-color.png" alt="Follow us on Twitter @wumbo"/></a></li>
    <li id="snapchat"><a href="#"><img src="/wp-content/uploads/2016/11/Snapchat-color.png" alt="Follow us on Snapchat @wumbo"/></a></li>
    <li id="insta"><a href="https://www.instagram.com/wumbo" target="blank"><img src="/wp-content/uploads/2016/11/Instagram-color.png" alt="Follow us on Instagram @wumbo"/></a></li>
    <li id="facebook"><a href="https://www.facebook.com/wumbo" target="blank"><img src="/wp-content/uploads/2016/11/Facebook-color.png" alt="Follow us on Facebook @wumbo"/></a></li>
 </ul>
</div>

    <div class="sub-footer">
        <div class="container">
            <div class="row">

                <div class="col-md-5-footer">
        <div class="footer-img">    
            <img src="https://www.wumbo.com/wp-content/uploads/2016/11/HullSpar_Slogan.png" alt="Made For The Modern Seafarer™"/>
        <div/>  
                </div>

            </div>

Dream Hunter - hashADH

I'm re-positioned your div.snapcode footer and applied a css property to

#snapchat:hover ~ .snapcode-footer . hopes this will help you :)

.snapcode-footer { 
  position: absolute;
  padding-top: 90px;
  text-align: center;
  left: 0;
  right: 0;
}

.sub-sub-footer {
  position: relative;
  z-index: 1;
  background-color: #F7F7F7;
  padding-top: 35px;
  padding-bottom: 20px;
}

.sub-footer {
  position: relative;
  z-index: 1;
  background-color: #edeeef;
  margin-top: 0px;
}

#snapchat:hover ~ .snapcode-footer{
  z-index:999;
  color:green;
  position:relative;
  margin-bottom:100px;
  margin-left:50px;
  }
  
<div class="sub-sub-footer">
 <ul class="social-footer">
    <li id="twitter"><a href="https://www.twitter.com/hullandspar" target="blank"><img src="/wp-content/uploads/2016/11/Twitter-color.png" alt="Follow us on Twitter @hullandspar"/></a></li>
    <li id="snapchat"><a href="#"><img src="/wp-content/uploads/2016/11/Snapchat-color.png" alt="Follow us on Snapchat @hullandspar"/></a></li>
   <div class="snapcode-footer">
<img src="https://hullandspar.com/wp-content/uploads/2016/11/snapcode.png" width="250px" height="auto" alt="Scan to add us on Snapchat!">
</div>
    <li id="insta"><a href="https://www.instagram.com/hullandspar" target="blank"><img src="/wp-content/uploads/2016/11/Instagram-color.png" alt="Follow us on Instagram @hullandspar"/></a></li>
    <li id="facebook"><a href="https://www.facebook.com/hullandspar" target="blank"><img src="/wp-content/uploads/2016/11/Facebook-color.png" alt="Follow us on Facebook @hullandspar"/></a></li>
 </ul>
</div>

    <div class="sub-footer">
        <div class="container">
            <div class="row">

                <div class="col-md-5-footer">
        <div class="footer-img">    
            <img src="https://www.hullandspar.com/wp-content/uploads/2016/11/HullSpar_Slogan.png" alt="Made For The Modern Seafarer™"/>
        </div>  
                </div>

            </div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to change color of element when hovering over another element?

How to make an element active on hover, and remain active when im hovering over another specific div

How to display a div when hovering over another div

How can I make a element show when hovering over another element, and hide it if not. And make it take up space the entire time

How to have a div show up when hovering over elements but not appear over the mouse pointer?

How can I change one svg path ID element when hovering over another element

Make an element appear and make adjustments when hovering over another element

WPF - hide element when hovering a mouse over another element

How do add a class to another div, when hovering over one div?

Change the Brightness of a div when hovering over another div

When hovering over <ul> I want another <ul> to show up

Changing the style of one div when hovering over another

(How to) When hovering over a logo, transforms up and text appears underneath?

Make an element move by hovering over another element

Do not scroll the table when hovering over the icon

How to stop the elements from growing when hovering over an element?

How to trigger two hovers when hovering over single element CSS

How to change css of one class when hovering over another?

How to trigger div visibility when hovering over list item in CSS?

Hovering over one element changes another?

how to change the visibility/opacity of another html element by hovering over another html element using jquery?

How to change the div style when you move the mouse over another element in another div?

Hovering over image and displaying text in another div

Hovering over 1 div to change content in another

CSS Hover Opacity Transition flicker when hovering over element that is on top of another element

How to change CSS elements of an element when hovering on another

How to change color on every element in div when hovering?

display an element when hovering on another element

When hovering over a child element in firefox

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    pump.io port in URL

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    flutter: dropdown item programmatically unselect problem

  14. 14

    How to use merge windows unallocated space into Ubuntu using GParted?

  15. 15

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  16. 16

    Nuget add packages gives access denied errors

  17. 17

    Svchost high CPU from Microsoft.BingWeather app errors

  18. 18

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  19. 19

    12.04.3--- Dconf Editor won't show com>canonical>unity option

  20. 20

    Any way to remove trailing whitespace *FOR EDITED* lines in Eclipse [for Java]?

  21. 21

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

HotTag

Archive