Unusual hover response observed on Chrome when hovering over a link

While using Google Chrome, I've encountered a peculiar hovering issue with a link inside a list. To demonstrate the problem, I have recreated it on this jsFiddle by copying the entire HTML and CSS from the website.

The trouble lies with the first element in the sidebar menu, which features the link "Maria Montessori." When hovering over the button, the hover effect seems to be interrupted or blocked in the middle where the text is located. You can try it yourself to better grasp what I am describing.

The relevant code snippet is as follows:

<ul class="page-menu">
    <li class="page_item page-item-30"><a href="http://...">Maria Montessori</a></li>
    <li class="page_item page-item-32"><a href="http://...">La pedagogia scientifica</a></li>
...

And here is the corresponding CSS:

.page-menu {
    display: inline-block;
    margin-right: 25px;
    text-align: center;
    width: 210px;
    li {
        margin-bottom: 10px;
    }
    li.current_page_item {
        a {
            background-color: $blue-montessori;
            border-bottom: 2px solid $blue-montessori;
            color: white;
            font-weight: bold;
        }
    }
    // remaining CSS styles continue below...

Upon inspecting it with developer tools, I couldn't find a solution, and oddly enough, the issue only seems to affect the first element. Strangely, everything functions correctly in Firefox.

Answer №1

The div container menu-menu-1 is causing overlap with the first menu due to the line-height property in your .nav-menu style. Consider using padding instead.

.nav-menu {
padding: 17px; /* replace line-height property */
}  

Updated Code with Fixes

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

Exploring Ember Octane (version 3.22 and above): benefits of using {{on 'click' this.function}} over traditional onclick={{this.function}} method

When working with Ember Octane, there are two different ways to attach a function to an event in an hbs file. The first way is the EmberJS approach: {{on 'click' this.function}} Alternatively, you can use the classic HTML method: onclick={{this ...

Scrolling the DIV element on a jQuery on-page scroll event

$(document).ready(function () { $(function () { var offset = $(".control.Home .rightCol").offset(); var topPadding = 15; $(window).scroll(function () { if ($(window).scrollTop() > offset.top) { $(".control.Home .rightCol ...

What is the best way to toggle the visibility of a background image within a carousel?

As a beginner in j-query, I am struggling with creating a slider image carousel using a full background image. Most of the solutions I found online require a fixed width for all pictures to slide smoothly. However, I believe there might be a way to use an ...

Arrange objects to have identical beginning points

Here is how my html code is structured: <div class="text-center"> (bootstrap class) <p>Username</p> <p>Name:</p> <p>Last name:</p> <p>Email:</p> </div> Link to jsfiddle I am attempting ...

Unwanted gap appears in the image slider

There seems to be a pesky little gap right below my image slider that I just can't seem to get rid of. I was hoping to spruce it up with a box-shadow, but when I tried it out on jsfiddle, it ended up looking pretty awful because of the annoying gap. I ...

Execute the JQUERY keyup function only if the mouse is not currently hovering over the input field

I'm struggling with the keyup function issue. My ordering form contains a certain number of items, some of which are grouped as follows: Item 1 - Group1 Item 2 - Group1 The grouped items have two input fields each, one hidden and one visible. I am ...

What is the best way to display text in html based on a specific condition being fulfilled in AngularJS?

Is there a way to display text in an HTML page only when a certain condition in an input box is satisfied, and hide it otherwise? I am currently using AngularJS and here is a snippet of my HTML code: <form novalidate="" class="simple-form">conditi ...

The Evolution of Alternatives to contentEditable

Related: ContentEditable Alternative I am curious about the timeline of online WYSIWYG editors prior to the existence of contentEditable. I remember using GDocs and GMail with rich-text features that functioned similarly to contentEditable. I would appre ...

What is the process of generating a tree menu using data from a MySQL database?

Looking to build a dynamic menu tree using PHP and MySQL data. In my MySQL table, I have the following fields: CREATE TABLE IF NOT EXISTS sys_menu ( menu_code varchar(16) COLLATE utf8_unicode_ci NOT NULL, menu_name varchar(64) COLLATE utf8_unicode_ci ...

Bootstrap row divs that overlap

My fields are overlapping when I resize my window smaller. How can I create space between them? UPDATE: Changing it to <div class='row ml-1' style="width:100px;"> reveals the overlap, and this is where I need to add space between ...

Steps for showing the text entered into the input box as soon as it is typed:

I am attempting to create a feature where text is displayed as soon as it is typed into an input box. Currently, my JavaScript function is not working at all. I simply want the function to display text when it is typed into or erased in the text boxes. & ...

The benefits of utilizing "native tags" instead of foreignObject in an SVG

As the creator of the stackoverflow-readme-profile project, I dedicated extensive time and effort to crafting a personalized Stackoverflow profile in the form of an SVG image. Utilizing "native svg tags," I meticulously constructed elements such as: < ...

Access the website by logging in with idhttp

I'm attempting to log in to a website using Delphi / Indy. Currently, I only have a button (used to send a password / username) that calls this procedure. procedure TForm5.Login(name: string; Pass: string); var UserID :string; Password :string; res : ...

Implementing class changes based on scroll events in JavaScript

const scrollList = document.getElementsByClassName('scrollList'); function scrollLeft() { scrollList.scrollLeft -= 50 } function scrollRight() { scrollList.scrollLeft += 50 } #scrollList { display: flex; overflow: auto; width: 10 ...

When you hover over the image, the text will disappear

When I hover over the image of LTC, a thumbnail appears with text and a button. However, I do not want the text "LTC" to be shown when hovering over the image. <div class="col-md-4"> <div class="view view-eighth"> <div class=" ...

Tips for Shifting Rows to the Right in Bootstrap 5

I need to adjust the layout of my page so that there are 2 rows on the left, a button in the center, and 2 rows on the right. I will include an image and the source code below! View Project Image Here is my source code using Bootstrap 5: function Convert ...

Designing this unique shape using CSS3 to create a sleek drop-down container

My goal is to design something that resembles the following: The challenge lies in my preference to contain it within a single div, considering the drop-down features an inner shadow and a drop shadow. Thank you in advance, and please feel free to ask fo ...

JavaScript code to enforce a 100% page zoom setting

After developing a small game in Canvas, I encountered an issue. Some users with their default zoom level set to something other than 100% are unable to view the entire game page. I attempted to resolve this by using the following CSS: zoom: 100%; This ...

Enhancing your website with a touch of elegance: horizontal scrolling

I am looking to incorporate an inset shadow to visually indicate that there is additional content available for scrolling. For a clearer understanding, here is a sketch: https://i.sstatic.net/odMPd.jpg Currently, I am utilizing Bootstrap framework for th ...

Is it appropriate in responsive design to use multiple markups for the same page elements?

Currently, I am in the process of coding a responsive design that will feature various navigation layouts depending on the screen resolution. Unfortunately, I don't have the authority to make design decisions in my workplace. While working on this pr ...