Floating causes elements to overlap

I recently created a control panel in Dutch where hovering over CV or "geen afspraak" reveals relevant content. However, I encountered an issue - when hovering over CV, "geen afspraak" overlaps the other text, making it partially unreadable. Can anyone offer a solution to this problem?

To make certain objects appear correctly when hovered over, I used position:absolute or relative depending on their purpose. This may be causing the issue, but I'm unsure how to fix it.

.control_panel {
  background-image: url(https://image.freepik.com/vrije-psd/witte-houtstructuur-achtergrond-ontwerp_1022-75.jpg);
  height: 400px;
  width: 400px;
  margin: 0 auto;
  margin-top: 100px;
  padding: 10px;
  border-radius: 4px;
}

.witte_achtergrond {
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
}

.acsuel-dropdown {
  display: none;
  position: absolute;
  display: none;
  width: 100%;
  overflow: auto;
}

#broer:hover .acsuel-dropdown {
  display: block;
}

.geen_afspraak {
  position: relative;
}

#broer:hover {
  cursor: pointer;
}

#broer {
  position: relative;
}

.hoer:hover .veeltekst {
  display: block;
}

#saaf {
  position: absolute;
  width: 100%;
  height: 100%;
  margin-top... (truncated)
<div class="control_panel">
  <div class="witte_achtergrond">Verklaring Omtrent het Gedrag</div>
  <div class="hoer">
    <div class="witte_achtergrond hover">CV</div>
    <p class="veeltekst">De afgelopen vijf jaar ben ik gepromoveerd op natuurwetenschappen, toen ben ik me nog meer gaan focussen op mijn werk als regisseur. Ik heb een zoon gekregen en heb verschillende bijbanen gehad in de filmwereld.<br><br> Creatief en enthousiast</p>
  </div>
  <div id="broer">
    <div class="witte_achtergrond geen_afspraak hover">
      geen afspraak
    </div>
    <div class="acsuel-dropdown">
      <table>
        <thead>
          <tr>
            <th class="wk">wk</th>
            <th>ma</th>
            <th>di</th>
            <th>wo</th>
            <th>do</th>
            <th>vr</th>
            <th cl... (truncated)

Answer №1

After following the guidance of Mr. Lister, I was able to resolve the issue by eliminating the position:absolute property from the veeltekst element.

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

A step-by-step guide on incorporating box-shadow for the jackColor in the Switchery Plugin

I am looking to add a box shadow to my iOS7 style switches for checkboxes when they are checked. Here is the code I have so far: var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function (html) { va ...

I need to verify the format yyyy-mm-dd hh:mm using a regex pattern

Trying to create a validation pattern for date and time in the format: YYYY-MM-DD hh:mm (Date time) led me to the following regex: "regex": /^((((19|[2-9]\d)\d{2})[\/\.-](0[13578]|1[02])[\/\.-](0[1-9]|[12]\d|3[01])\ ...

A pale tooltip with a light arrow appearing against a soft white backdrop

Can someone help me figure out how to display a white tooltip with a white arrow? I've tried to implement it using the code below, but the white color is not visible against the background. Any suggestions on making it stand out? https://i.sstatic.ne ...

Request for "/media/img/image.png" was made using HTTP/1.1 but ended in a 404 error with a response size

Upon loading the page, there seems to be an issue with the image not appearing. The image was uploaded using Django-admin. Below is the section of the HTML template responsible for loading the image: Home.html <img class="card-img-top" src=&q ...

Ways to implement CSS for limiting the scrollable width of a div element in a web browser

Can anyone guide me on using CSS to limit the scrollable width of a page when the browser is not maximized? An example can be seen on the landing page of When the browser is maximized, there is space around the lady in the picture, but as you reduce the b ...

Use jQuery to swap out every nth class name in the code

I am looking to update the 6th occurrence of a specific div class. This is my current code <div class="disp">...</div> <div class="disp">...</div> <div class="disp">...</div> <div class="disp">...</div> < ...

Populate items on the webpage with data from a JSON document

Looking for a more efficient way to handle text in my multilanguage web application. I currently store all text in a JSON file and load it for each element on every page using JQuery, like this: $("h1.text1").append(data[language]['startpage'][0 ...

When should CSS compression and combining / JS minification be performed - at runtime or during build time?

I need to find a way to compress, version (for caching reasons), and possibly combine our JS and CSS files. I've come across two main approaches so far: 1) During the build process: Using an MSBuild task or similar. 2) Dynamically at runtime: Through ...

Position the JMenuBar below the JPanel

Currently, I am customizing a JDialog by setting it to setUndecorated(true) and adding a JPanel to replace the default title bar. Within this setup, there is an internal frame containing a JMenuBar among other components. My goal is to relocate the JMenuB ...

Learn how to dynamically alter the background of an ExtJS button when it is hovered over or pressed

Greetings, I am looking to dynamically change the background-color for different states (normal, hover, pressed) of a button. Here is what I have come up with so far: http://jsfiddle.net/suamikim/c3eHh/ Ext.onReady(function() { function updateBackgr ...

Click on the child element while it is already being clicked by manually implementing the 'declick' function in Javascript

Hey there, I'm looking for suggestions on a better title for this issue. I couldn't come up with the right wording myself. Problem I currently have a Google Maps element with pointer events set to none, preventing it from being scrolled when ho ...

CSS margin dispute

I'm facing an issue with two CSS classes - container and top_menu. The top_menu should not have a margin on top when used within the container class, but it somehow does. Removing the container div resolves this. How can I resolve this problem? Below ...

The CSS3 Animation-fill-mode: An Essential Property

I am working on a cool effect where text slides into the window and remains in place after the animation is complete. Surprisingly, I have managed to get the animation to work on one part of the text, but for some reason, the second part is not cooperating ...

When using the `sendFile` method in Node.js Express, you will notice that the HTML content

Hey there, I'm new to nodejs and trying to create a simple website with two pages. I'm facing an issue where the content of the second file is being rendered as the first one, even though the source inspector in the browser indicates that it&apos ...

What causes the button's frame color to change when I click on it?

I am facing an issue with a button I created. When I click the button, the frame color changes and I cannot figure out why. I have attached images showing the button before and after it is clicked. Before: https://i.sstatic.net/5jpB1.png After: https://i ...

What is the best way to adjust the size of a column when hovering

What I am attempting to achieve is, I would like the column box to have a 100% width, and when it is hovered over, I want it to transition to the left, with the width of the column box being about 60%, revealing a second block that shows up as 20% width o ...

Interactive input box featuring selectable suggestions

Hey, I'm looking to design an HTML input field with a suggestions menu. The desired effect is similar to the image provided below, where clicking on the input field triggers a dropdown menu to appear. I'm curious if there are any plugins or code ...

Tabs fail to load any content within their designated tab-panes

Struggling to create a bootstrap site with nav-tabs navigation. Can't figure out why the content isn't loading in the tab-pane. The tutorial works, but my project doesn't. Any assistance would be appreciated. I want the tabbed content to dis ...

What could be causing the issue with Hindi text not displaying properly on Safari?

I'm having trouble with displaying Hindi text on my website. I tried pasting the text in a new file and it worked, so why is it not loading correctly in this case? The Hindi script is within the second span with the class word w2. "use strict"; le ...

What is the method to identify the specific values causing a div to overflow in every direction?

Is there a method to accurately determine the specific quantities by which a div is overflowing in each direction? The information I found online only helped me calculate total horizontal or vertical overflow values. However, I am interested in knowing t ...