Floating hover box gracefully descends as you hover over it

While working on this particular site, I encountered an issue with the password being set as joint123. There was a map displayed with icons on the right side, and when hovering over the icons, the corresponding address would appear. However, the problem arose when hovering over the lower icons - the footer div would move down as well. Can anyone provide assistance in resolving this?

Below is the HTML and CSS code:

 .cont-map {
   background: url('http://beta.jointviews.com/wp-content/uploads/2015/01/map1.png')no-repeat;
   width: 590px;
   float: right;
 }
 .box1,
 .box2,
 .box3,
 .box4,
 .box5,
 .box6 {
   display: none;
 }
 .img-1:hover .box1,
 .img-2:hover .box2,
 .img-3:hover .box3,
 .img-4:hover .box4,
 .img-5:hover .box5,
 .img-6:hover .box6 {
   display: block;
   background: white;
   border: 1px solid;
   padding: 10px;
   /*width:250px;*/
   float: right;
 }
 .img-1,
 .img-2,
 .img-3,
 .img-4,
 .img-5,
 .img-6 {
   width: 300px;
 }
 .box1 p img,
 .box2 p img,
 .box3 p img,
 .box4 p img,
 .box5 p img,
 .box6 p img {
   width: 50px;
 }
 .p-1 {
   height: 50px;
   padding-top: 130px;
   margin-left: 39.5%;
       font-size: 4px;
   line-height: 1px;
 }
 .p-2 {
   height: 50px;
   padding-top: 155px;
   margin-left: 29.5%;
 }
 .p-3 {
   height: 50px;
   padding-top: 33px;
   margin-left: 39.5%;
 }
 .p-4 {
   height: 10px;
   margin-left: 36.5%;
 }
 .p-5 {
   margin-left: 36.5%;
 }
 .p-6 {
   margin-top: -49px;
   margin-left: 38.2%;
 }
<div class="cont-map">
  <div class="p-1">
    <div class="img-1">
      <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/mapicon.png">
      <div class="box1">
        <p>
          <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/edsys-logo1.png">Regional Office: Noida B-81, Sector -65 Noida, UP – 201301 India
        </p>
      </div>
    </div>
  </div>
  <div class="p-2">
    <div class="img-2">
      <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/mapicon.png">
      <div class="box2">
        <p>
          <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/edsys-logo1.png">Corporate Office: Pune 315 Aurora Tower Camp Pune-411001, Maharashtra India
        </p>
      </div>
    </div>
  </div>
  <div class="p-3">
    <div class="img-3">
      <img src="http://beta.jointviews.com/wp-content/uploads/2015/01/mapicon.png">
      <div class="box3">
        <p>
          <img style="float:left;" src="http://beta.jointviews.com/wp-    content/uploads/2015/01/edsys-logo1.png">Marketing Office: Bangalore Caravel Tower #13/15/2, S.T. Bd Area Koramangala, Bengaluru India
        </p>
      </div>
    </div>
  </div>
  <div class="p-4">
    <div class="img-4">
      <img src="http://beta.jointviews.com/wp-content/uploads/2015/01/mapicon.png">
      <div class="box4">
        <p>
          <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/edsys-logo1.png">Associate office: Calicut M.S.S Complex Cherooty Road Kozhikode, India</p>
      </div>
    </div>
  </div>
  <div class="p-5">
    <div class="img-5">
      <img src="http://beta.jointviews.com/wp-content/uploads/2015/01/mapicon.png">
      <div class="box5">
        <p>
          <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/edsys-logo1.png">Regional Office: Cochin Velayudhan vaidyans`s building, Padma Jn., M.G. Road Kochi – 682 035 India
        </p>
      </div>
    </div>
  </div>
  <div class="p-6">
    <div class="img-6">
      <img src="http://beta.jointviews.com/wp-content/uploads/2015/01/mapicon.png">
      <div class="box6">
        <p>
          <img style="float:left;" src="http://beta.jointviews.com/wp-content/uploads/2015/01/edsys-logo1.png">Regional Office: Trivandrum Edsys Towers, Kamaleswaram Thiruvananthapurum -695009 India
        </p>
      </div>
    </div>
  </div>
</div>

Answer №1

The containers are currently influencing the flow and causing the footer to be pushed down when they're visible. To prevent this, you can use the following CSS:

.container1, .container2, .container3, .container4, .container5, .container6 {
    position: absolute;
}

By setting their position to absolute, you will remove them from the document flow.

Answer №2

To ensure that the boxes float above the page and do not occupy space, you will need to set their position to absolute.

Check style.css at line 2161 for the following code:

.box1, .box2, .box3, .box4, .box5, .box6 {
   display: none;
   position: absolute; /* make sure this line is included */
}

Answer №3

Give this a shot...

.img-1,.img-2,.img-3,.img-4,.img-5,.img-6 {width: 300px;position:relative;}
.box1,.box2,.box3,.box4,.box5,.box6 {display: none;position:absolute;top:30px;left:0;}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Custom stylesheet for individual users?

On my website, users can pick a template for their webpage. After selecting a template, I would like them to have the ability to customize certain styles like the font color. Is there a way to achieve this? I was thinking about saving the user's cus ...

Transform all characters to lowercase, then capitalize them using only CSS

I came across a discussion on this topic at: First lowercase the text then capitalize it. Is it possible with CSS? However, the solution provided was not purely based on CSS. I have a div that contains the following text: <div> RaWr rAwR </div&g ...

Generating dynamic divs in parallel

Despite encountering numerous posts related to the issue at hand, none of them have solved my specific problem. I am aiming for 3 divs to display in each row, but the current code is causing each div to show up on a new line vertically: JQuery ...

Having trouble displaying the output on my console using Node.js

Hey there, I'm new to this community and also new to the world of nodejs technology. I have encountered a problem that may seem minor to you but is quite big for me. Here's what's going on: In my code snippet, I want a user to input 3 value ...

Why does LESS keep prompting me with missing elements?

I am currently working on my first project using Less and have been following a tutorial closely. However, when I try to compile with lessc, I encounter the following error: ParseError: Unrecognised input. Possibly missing something in C:\Path\t ...

having trouble with developing a dropdown menu using jquery

I'm currently creating a drop-down menu for my website and here is the code I'm using: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html dir="ltr"> <head> <met ...

Initially, my PDF file does not get selected, except in the Internet Explorer browser

I am currently facing an issue with selecting PDF files in Internet Explorer. The process works smoothly in Google Chrome, but I encounter a problem when trying to select PDFs in IE. Specifically, when I attempt to select a PDF for the first time in Inter ...

Using canvas to smoothly transition an object from one point to another along a curved path

As a beginner in working with canvas, I am facing a challenge of moving an object from one fixed coordinate to another using an arc. While referring to the code example of a solar system on https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutori ...

Echo a JS variable into PHP and then insert a PHP file into an HTML element - a step-by-step guide!

Greetings to the wonderful community at stackoverflow, I am currently working on a variable code that allows for easy insertion of code from another file, such as a div. I am curious if it is possible to include a PHP file using JavaScript and JS variable ...

How to conceal hyperlink underline with css

This is some HTML Code I'm working with <a href="test.html"> <div class=" menubox mcolor1"> <h3>go to test page</h3> </div> </a> Here's the corresponding CSS: .menubox { height: 150px; width: 100%; ...

Incorporating and utilizing the HTML5-captured image as a point of reference

I understand that all I need to do to achieve this is insert <input type="file" id="photo" accept="image/*;capture=camera"> However, my lack of coding skills has caused issues with actually grabbing and using the image selected/taken by the user. ...

Showing a 2D array in HTML using ngFor loop

I need to display a list of arrays in an HTML p-table. Here is the array list: [Array(2), Array(2), Array(2), Array(2), Array(1)] 0: (2) ["abc", "def"] 1: (2) ["ghi", "jkl"] 2: (2) ["mno", "pqr"] ...

Is there a way to develop a login form that retrieves information from a Google Sheet database?

Please help me with a solution. I have developed a registration form which effectively saves users' information in a Google Sheet. However, now I am yearning to create a login form that verifies the stored data and redirects the user to a different pa ...

Animation not fluid with ReactCSSTransitionGroup

Currently, I am in the process of developing an image carousel that showcases images moving smoothly from right to left. However, despite its functionality, there seems to be a slight jaggedness in the animation that I can't seem to resolve. Interesti ...

Overcoming Troublesome Login Input Box in Web

In an effort to streamline tasks in our office, I am working on automating certain processes. Specifically, this program is designed to log into our insurance company's website and extract information for payroll purposes. Below is the code snippet th ...

The functionality of min-height in CSS seems to be malfunctioning

One of my HTML elements has a parent with the ID #out, and a child with the ID #in. The parent is positioned absolutely, with a minimum height of 100%. It seems to be functioning correctly in most browsers, except when I also set the child's min-heigh ...

Experience the captivating AUTOPLAY feature of the mesmerizing FULLSCREEN SLIT SL

I am currently utilizing a slider that is functioning well, however I am encountering an issue with autoplay. Whenever I click on the navigation arrow or Nav dot at the bottom of the slider, the autoplay feature stops working. For more information, please ...

What is the best way to center a SVG and a span vertically within an inline unordered list?

My <ul> element contains 2 <li> items with styling using display: inline-block. Unfortunately, the SVG and text inside each <li> are not vertically aligned. I attempted to use vertically-align: middle since they're both inline-block ...

How to Convert Pixel Units to Rem and Em in CSS?

Until recently, I developed my website exclusively using pixels, which has made it less responsive than I'd like. Is there a method to efficiently convert pixel measurements to rem/em units, allowing for quicker and easier modifications? ...

Whenever I adjust the zoom on my HTML page, it either scrolls upwards or downwards

Is there a way to prevent the page from scrolling when using zoom-in or zoom-out? I attempted using overflow: hidden in the body, but it did not work. <!DOCTYPE html> <html lang="en"> <head> <meta charset=&q ...