Styling tip: Distance the tooltip from its parent element when scrolling through a list

I have a table inside li tag, and I want to display the description on :hover inside td. However, when scrolling through the list, the description content starts to appear with a distance from its parent.

Despite trying various combinations of position settings for the description content parent and itself, following tips found on this site, nothing seems to work. My goal is simply to show the description on hover directly above each element. With the current CSS, as I scroll further down the list, the descriptions are shown even farther apart from their respective parents, as shown in the image.

Before scrolling: description, before any scrolling

The issue: After some scrolling: description with varying distances that correlate with scroll amount

    .side div {
      margin: 0;
      padding-left: 1%;
      padding-top: 1%;
      padding-right: 0.5%;
      width: 20%;
      background-color: #D9D9D9;
      position: fixed;
      height: 100%;
      box-shadow: 10px 0px 15px rgba(0, 0, 0, 0.3);
      border-radius: 8px;
      z-index: 1;
    }

    // Rest of the CSS code...
    <div class="side">
    <div>
      <ul>
        <li>
          <table class="subscribed-channels" 
                 data-ng-model="subscribedChannels">
            // Table rows here...
          </table>
        </li>
      </ul>
    </div>
</div>

Answer â„–1

From my perspective, the best approach would involve utilizing absolute positioning, although it appears that your main issue lies within the unusual overflow settings applied to the list.

.side div {
  margin: 0;
  padding-left: 1%;
  padding-top: 1%;
  padding-right: 0.5%;
  width: 20%;
  background-color: #D9D9D9;
  position: fixed;
  height: 100%;
  box-shadow: 10px 0px 15px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  z-index: 1;
}
.side table {
  margin: 0;
  padding: 0;
  width: 100%;
  border-radius: 8px;
  table-layout: fixed;
}
...
<div class="side">
  <div>
    <ul>
      <li>
        <table class="subscribed-channels" data-ng-model="subscribedChannels">
          <tr data-ng-repeat="channel in subscribedChannels" data-ng-click="enterChannel(channel.ChannelName)" data-ng-class="{active: isActive(channel.ChannelName)}">
            <td>channel</td>
            ...
            </td>
          </tr>
          <tr>

            <td>channel</td>
            ...

          </tr>
          <tr>
            ...

          </tr>
        </table>
      </li>
    </ul>
  </div>
</div>

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

Get rid of the folder from the URL using an <a> tag

I have both an English and French version of my website located at: *website.com/fr/index.php *website.com/index.php Currently, I have a direct link to switch between the two versions: -website.com/fr/index.php -website.com/index.php. However, I ...

Tips on retrieving the URL of a background image using "$event.target" to display in an Ionic modal

How can I display the clicked image in a modal? Implementation: <a ng-click="openModal($event)" ng-style="{'background-image': 'url(assets/img/img-01.jpg)'}"><img src="assets/alpha-4x3.png"></a> <a ng-click="openM ...

Automating web tasks through Excel VBA with SeleniumBasic has been a game-changer for me. However, I am facing

My aim is to load the messages found using WDrv.FindElementsByXPath("//*[@id='divMessageLines']/div"), but I am unsure of how to retrieve the values individually. The number of values for each search varies. The HTML segment in questio ...

Extract information from a webpage using JavaScript through the R programming language

Having just started learning about web scraping in R, I've encountered an issue with websites that utilize javascript. My attempt to scrape data from a specific webpage has been unsuccessful due to the presence of javascript links blocking access to t ...

Apache2 is displaying a 403 Forbidden Error

Working on setting up Apache2 on my Ubuntu system has been a successful endeavor. However, I am encountering a challenge in configuring a server for my AngularJS project's HTML pages. Currently, the directory is as follows: <Directory /var/www/htm ...

Duplicate text content from a mirrored textarea and save to clipboard

I came across some code snippets here that are perfect for a tool I'm currently developing. The codes help in copying the value of the previous textarea to the clipboard, but it doesn't work as expected when dealing with cloned textareas. Any sug ...

What is the best way to add the SO-style <kbd> effect to my presentation made with HTML?

I'm currently utilizing reveal.js to construct an HTML-based presentation. My goal is to incorporate keyboard symbols like the ones found on SO and Github using the <kbd>SPACE</kbd> syntax, resulting in this glyph: SPACE. Despite attempti ...

What is the proper way to utilize CSS animation delays in order to design a collapsible HTML container?

I'm trying to implement responsive CSS animation delay to create an accordion effect when a user clicks on an arrow associated with a table, all without using JavaScript and only utilizing HTML/CSS. Check out the mobile view in action here: https://w ...

Transforming Angular models into formatted dates

I am having trouble formatting a datetime object obtained from an ng-model for display on an input field. Despite checking the code and verifying that the date is correctly formatted, it still does not display as expected. Can someone shed some light on th ...

Convert all page links to post requests instead

Currently, I am working on a JavaScript project where my objective is to transform all links on the page into forms. This will enable the requests to be sent using the POST method rather than the GET method. The code I have implemented so far is as follow ...

AngularJS $http.post triggers a 404 error indicating the status of the Express server

I recently set up separate ports for my express server and angular front end, using yeoman and grunt for the first time. This is my first experience working on a web project with this client/server structure, and I've encountered a challenge. On my f ...

Tips for effectively utilizing an autocomplete input field with Vue that draws information from a database source

I am looking for a way to implement an autocomplete feature in my Vue application using data from a database table with over 3000 records. Here is how I am currently retrieving the data: data(){ return{ inboundRelation_Trelation_data: [], } ...

Create a custom overlay for an image that is centered horizontally and does not have a fixed width

I'm working with this HTML setup: <div class="container"> <img class="image" /> <div class="overlay"> <div class="insides">more content here</div> </div> &l ...

Learn the process of transforming the date "Mon Mar 14 2014 00:00:00 GMT+0530 (IST)" into the format "2014-03-08" using the Moment.js library

When working in AngularJS, specifically in the controller.js file, I encounter an issue where dates retrieved from the database are in the format "Mon Mar 14 2014 00:00:00 GMT+0530 (IST)". Strangely, when I try to display this date using an AngularJS dat ...

The issue I'm facing with my CSS is that the Doctype is causing some styles to

Hey there! I've been pondering the use of !DOCTYPE html lately. I recently put together a basic webpage that looked great on most browsers except for IE. After doing some digging, it was recommended to me to use !DOCTYPE html. However, this ended up ...

Tips for customizing the transparency of a Bootstrap dropdown menu

I'm currently working with .navbar-default { z-index:99; opacity:0.8; } However, I am looking to adjust the opacity of dropdown menu items to 0.9. I have attempted several solutions without success. Here are a few examples: .dropdown-menu>li> ...

CSS guidelines specifically for when two classes are required to exist simultaneously

Is there a specific effect that can only be achieved when two classes are present simultaneously? For example: .positive{ color:#46a546; } .positive:after{ content: "\25b2"; } .negative{ color:#F00; } .arrow:after{ content: "\25bc"; ...

What is the best way to choose all cells that begin, include, or finish with a specific term using JQuery/CSS?

I have a table with some cells and I am looking to utilize JQuery to select specific cells. For example: <td>John Doe</td> <td>John Doe1</td> <td>1John Doe</td> I want to select cells that start with 1, include Doe, a ...

Enclose Words Inside Unconventional Outline

Place text within a uniquely shaped border… I am attempting to achieve this goal in the most responsive and backward compatible way possible. I understand that compromise may be necessary. I have made progress with the help of this thread, but the svg ...

Material-UI is having trouble resolving the module '@material-ui/core/styles/createMuiTheme'

Although I have searched for similar issues on StackOverflow, none of the solutions seem to work for me. The errors I am encountering are unique and so are the fixes required, hence I decided to create a new post. The company conducting my test provided m ...