Seeking help with a problem regarding the Tooltip Effect not displaying over a button

I'm currently struggling with implementing a tooltip for the "Back-end" button on my webpage. Despite my efforts, the tooltip effect fails to display over the button, and I'm at a loss as to why.

Below is the code snippet I am working with:

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/style/interface1.css">
    <title>interface</title>

<style>
/* Styles for the "Back-end" button */
.back-end_link{
    display: flex;
}
.back-end_link button{
    background-color: rgba(0, 0, 0, 0.993);
    color: aliceblue;
    border: transparent;
    transition: 0.5s;
    font-size: 30px;
    box-shadow: inset 0 0 0 0 rgb(0, 0, 0);
}
.back-end_link button:hover{
    border: none;
    background-color: rgba(255, 255, 255, 0.949);
    color: rgba(0, 0, 0, 0.485);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.373);
    transform: scale(0.9);
    letter-spacing: 3px;
    box-shadow: inset 0 0 10px rgb(255, 255, 255), 0 0 40px rgb(255, 255, 255), 0 0 80px rgb(255, 255,
    255);
}
.details-back-end{
    color: #fff;
    visibility: hidden;
    opacity: 0;
}
.back-end_link:hover .details-back-end{
    visibility: visible;
    opacity: 1;
}
.details{
    font-family: "Kanit", sans-serif;
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    width: 1100px;
    color: aliceblue;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.575);
}
</style>
</head>
    <body>
        <div class="container">
       
        <div class="login-registro">
            <div class="login">
                <button id="login-button">
                    <a href="login.html">
                        login
                    </a>
                </button>
            </div>
        <div class="register">
             <button class="register-button">
                <a href="registro.html">
                    registre-se  
                </a>
             </button>
        </div>
    </div><!--div login-registro-->
        <div class="front-back">
            <div class="front-end_link">
                <a href="#">
                    <button>
                FRONT-END
            </button>
                </a>
        </div>
            <div class="back-end_link">
                <a href="#">
                    <button>
                BACK-END
            </button>
                </a>    
       
        </div>
            </div><!--div front-back-->
        <div class="details">
          <p class="details-front-end">
           DETAILS ABOUT FRONT-END
          </p>
          <p class="details-back-end">
            DETAILS ABOUT BACK-END
          </p>
          </div>
        </div>
        </div>
    </body>
</body>
</html>

I've experimented with different solutions to rectify this issue, but unfortunately, the tooltip remains invisible when hovering over the "Back-end" button.

If you have any insights or suggestions on where I might be going wrong, I would immensely appreciate your assistance!

Thank you.

Answer №1

Upon reviewing your code, it appears that you are aiming to implement a tooltip feature when hovering over an HTML element, specifically a button in this scenario. You can refer to this resource for a straightforward guide on creating tooltips upon hover.

Your implementation could resemble the following code snippet:

.tooltip {
  margin-top: 50px;
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -60px;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}
<!DOCTYPE html>
<html lang="pt-br">

<head>
  <meta charset="UTF-8>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/style/interface1.css">
  <title>interface</title>

</head>

<body>
  <div class="tooltip">Hover over me
    <span class="tooltiptext">Tooltip text</span>
  </div>
</body>

</html>

Answer №2

It is necessary to apply this effect to the button, as shown by the overlay on the backend button link

@import url('https://fonts.googleapis.com/css2?family=Inter:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bccbdbd4c8fc8d8c8c9292858c8c">[email protected]</a>&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&......
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    ......<body>

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

What is the best way to include and delete several images on a canvas?

Recently, I've started working with canvas in HTML5 and I'm tasked with creating a paint application. One of the features I need to implement is the ability to dynamically add selected images to the canvas as the mouse moves, and then have the fu ...

Utilizing a Clear Button to Reset Specific Fields in a Form Without Clearing the Entire Form

I am currently working on a multipart form that includes 'Name', 'Email', and 'Phone Number' fields. It's important to note that the phone number field is actually composed of 10 individual single-digit fields. To enhan ...

Buttons for concealment and revelation are unresponsive

I have the following code snippet for uploading an image, which is taken from a template utilizing bootstrap 2. <div class="span6"> <div class="control-group"> <label class="control-label">Imagen</label> <div cla ...

Utilizing Bootstrap in Laravel to align the heights of rows in adjacent columns

I am in the process of developing a calendar application that includes a header row and a header column. The layout displays six days in columns with a fixed number of time periods per day. <div class="row"> <div class="col-md c ...

Show the text area content in an alert when using Code Mirror

When I try to alert the content of a textarea that is being used as a Code Mirror on a button click, it appears blank. However, when I remove the script for Code Mirror, the content displays properly. I am puzzled about what could be causing this issue wi ...

"Enhancing Your Website with Dynamic CSS3 Div Animations

Seeking assistance in displaying an empty div after a CSS3 Animations loading circle has completed. Any guidance is welcome! jsFiddle ...

Ensure the width of ancestor flexbox divs is limited to the width of its child by setting a specific width

I have a specific element that incorporates flex display and I've defined its width with the flex-basis property like this: .flex-row input { flex: 0 1 450px; } There is a flex-row division nested inside a flex-container division. My goal is for th ...

Transform the text upon hovering over the image, with the text positioned separate from the image

I'm looking for a solution where hovering over images in a grid area will change the text on the left side of the screen to display a predefined description of that image. I've been working on this problem for hours and would appreciate any help. ...

The Bootstrap modal causes the scrollbar to vanish upon closure

Despite trying numerous solutions and hacks on this issue from StackOverflow, none of them seem to work for me. Currently, I am utilizing a modal for the login process in Meteor (e.g. using Facebook login service) which triggers a callback upon successful ...

Create a hyperlink to the tabbed navigation menu

I want to create links to the tabbed menu for my website. The homepage has 4 categories: car, van, truck, and special, each of which leads to the portfolio page. The portfolio page includes a simple filtered tabbed menu structured like this: <ul id="f ...

What is the best way to make a linear gradient that spans the entire vertical space that is visible (or shifts to a solid color)?

I'm trying to figure out how to apply a linear gradient to the body element of my webpage. Here's the CSS code I've been using: body { background: linear-gradient(0deg, white, lightgray); } The issue I'm facing is that the gradien ...

How can the parent div's height be determined by the child div when using position: absolute?

I am struggling with setting the height of a parent div that contains a nested child div with absolute positioning. The child div has a fixed height of 652px, but I cannot seem to get the parent div to match this height. I have tried adjusting the clear an ...

Setting up pagination for displaying data from a database on the client-side: a step-by-step guide

Greetings to all my fellow programmers on Stack Overflow! I am currently in the process of developing an e-commerce application using JSP. The products for the application are stored in a server-side database (Mysql) within a table named product. The prod ...

Is it possible for the font size to adjust based on the heading (h1, h2, h3) I choose when using CSS to specify a particular font size?

What will happen if the following HTML code is used: <h1> This is text</h1> <h2> This is also text</h2> and CSS is applied to change the font size like this: .h1 { font-size: 30px } .h2{ font-size: 30px } Will both texts ...

What is the trick to having the ball change colors every time it hits the wall?

Recently, I stumbled upon this interesting ball bouncing question while searching for some JavaScript code. While the basic bounce animation was simple to achieve, I started thinking about how we could make it more dynamic by changing the color of the ball ...

Maintaining CSS elements in position

Hello everyone, I have a project at work where I need to create a map with specific cities pinpointed. I've completed it on my computer and now I'm trying to ensure that when I transfer it to another device, like a laptop, the points remain in t ...

New design in TinyMCE V5: Vertical toolbar labels arranged within a CSS grid layout

When TinyMCE version 5 is placed inside a CSS grid layout, the toolbar labels are displaying vertically. It appears that the "width:auto" property is not being applied correctly, and I am struggling to find a solution to fix it. I would greatly appreciat ...

Using Flexbox for laying out content in both columns and rows

Hey there, I'm looking for a little help. It's been quite some time since I last built a website from scratch and I want to keep things simple this time around. I've used breakpoints before, but I'm curious if Flexbox could be a better ...

Is it possible to set a single Tailwind breakpoint that will automatically apply to all CSS styles below it?

Responsive design in Tailwind is achieved by using the following code snippet: <div className="sm: flex sm: flex-row sm: items-center"></div> It can be cumbersome to constantly include the sm: breakpoint for each CSS rule. I want ...

Is there a way to access the badge hidden behind the collapsible menu in bootstrap 4?

After moving from bootstrap 3 to bootstrap 4, my items no longer align properly. I've scoured the entire Internet for a solution, but I've run out of options (and patience.. haha) This is how it currently looks: https://i.sstatic.net/ra22j.png ...