Transition Effect for Sub Menu Hover in Google Chrome

The top menu bar on my website has a second level dropdown that is functioning correctly in Firefox but not in Chrome.

In Chrome, when I mouse out of the dropdown, the background color disappears before the links. This creates a slight timing gap between the disappearance of the color and the links.

Below is the code snippet for the menu:

<nav class="top_menu">
    <ul class="show-for-medium-up">
        <li class="first active"><a href="index.php">Home</a></li>
        <li><a href="weddings.php">About Us</a></li>
        <li class="rev has_dropdown"><a href="wedding-services.php">wedding services</a>
            <ul class="dropdown">
                <li class="first"><a href="#">wedding decor</a></li>
                <li><a href="#">lights &amp; drapping</a></li>
                <li><a href="#">linen</a></li>
                <li><a href="#">catering</a></li>
                <li><a href="#">transport</a></li>
            </ul>
        </li>
        <li class="last"><a href="contact.php">contact us</a></li>
    </ul>
</nav>

Demo: http://jsfiddle.net/squidraj/71f15Lc6/

The menu functions properly in Firefox. Any assistance to resolve this issue in Chrome would be greatly appreciated. Thank you in advance.

Answer №1

Below are the CSS sections that include transitions:

a {
    font-weight: 600;
    -webkit-transition: 0.4s;
    -moz-transition: 0.4s;
    -o-transition: 0.4s;
    -ms-transition: 0.4s;
    transition: 0.4s;
}

.top_menu ul li ul li a {
    color:#bcb194;
    width:100%;
    display:block;
    padding:0.5rem 0 0.5rem 0.8rem;
    margin:0;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
    font-weight:normal;
    text-transform: uppercase;
}

These sections contain transitions for the individual <a> elements which may cause issues with your menu. Consider removing these transitions if they are not essential to your design.

For a demonstration, you can view a working example on this Fiddle: http://jsfiddle.net/71f15Lc6/1/

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

Tips for implementing a CSS override for a block element's relative date

I am looking to customize this source code by using a CSS override to ensure that the "lightning-relative-date-time" element is not utilized. I want to keep it displaying the timestamp information by default. Can you guide me on how to achieve this throu ...

Is it possible to rotate an image with a random angle when hovering in Angular?

I'm currently working on a photo gallery project and my goal is to have the images rotate when hovered over. However, I am experiencing difficulties in passing values from TypeScript into the CSS. HTML <div class="back"> <div cl ...

Having difficulties showcasing a variety of images stored in the database

I'm having some trouble with my e-commerce site. I can't seem to display different product images from the database on my homepage. The code I have only shows one image for all products, even though they should each have their own unique image up ...

Enhance Your Page with a Widget Using Bootstrap

I am looking to incorporate a basic text box on the side of my webpage. https://i.sstatic.net/qzwIh.png Currently, I have a table on the page. Upon adding the widget, I need the table to reduce its width. ...

Truncate a string in Kendo Grid without any white spaces

While using a Kendo-Grid for filtering, I've come across an issue where my cell does not display the full string if there is no white space. The problem can be seen in the image below: https://i.sstatic.net/0h1Sg.png For example, the string "https:/ ...

A method for displaying a message to the user within an input div based on a database value using an if statement

Having some trouble with this code, can anyone offer assistance? The v_central_locking value should be either 0 or 1. Here is the code snippet to display the value fetched from the database: <?php <!--box start--> ...

Issue with Angular controller failing to load when link is clicked

I am currently developing a webpage that incorporates Angular and responds to ajax requests by populating data into a table. When I manually enter the address, everything works as expected. However, if I navigate to the page using a link ( <a href="/pro ...

Is it possible for me to set my HTML body class as ".body" in CSS?

CSS .body { background: linear-gradient(-45deg, rgb(255, 0, 0), rgba(216, 29, 29, 0.856), #fdfdfdd7, #234cd5, #ffffff); background-size: 400% 400%; background-repeat:no-repeat; animation: gradient 35s ease infinite; height: 100vh; } HT ...

Conceal the HTML element within a subscription

Currently, I am utilizing Angular and have a checkbox that I need to toggle visibility based on the response of an API call subscription. The issue lies in a delay when trying to hide the checkbox (as it is initially set to visible). My assumption is that ...

What are the best practices for utilizing the onLeave() function in fullpage.js?

My goal is to make the user scroll through 4 sections. Upon reaching the fourth section, if the user scrolls down again, instead of going to the fifth section, the view should loop back to the first section. (The fifth section only contains the imprint and ...

Looking for a way to ensure a div reaches 100% height within a specified area without exceeding the boundaries of the body?

I am working with jQuery mobile and have specific requirements for my project: The main content will be a large graphic that needs to fill the entire page, with both horizontal and vertical scrolling if necessary. The header should remain fixed at the to ...

Conflict with choosing options identified when using Select Box on IOS iPad mini

I am currently attempting to display a select box with scrolling on an iOS iPad mini. Issue: The options are not appearing inside the select box, instead they are overflowing outside of it in the popover. CSS .indicators_geography { font-size: 12px; ...

Frame Tweet Integration

Attempting to create an iframe modal with a Twitter share source. <iframe src="https://twitter.com/share" class="tweetFrame"></iframe> The current setup is not functioning properly, resulting in a blank page. Is there a workaround to ensure t ...

Seeking assistance with creating an iPad application utilizing JQtouch - any t

I am attempting to create an iPad app using jQuery and jQTouch for the second time. I want to split the existing jQTouch theme designed for iPhone, which uses one window, into two separate windows optimized for the iPad. My goal is to have navigation on t ...

What is the best way to prevent a website from continuing to scroll past a specific point?

Here is the code I'm working with: Link to my Codepen I need to figure out how to prevent the website from scrolling beyond the end of the content. I've tried using overflow-y:hidden; in the body element, but that stops the page from scrolling a ...

JS if clause fails to return true as expected

Here is my setup: <div id="user_input">...</div> And a button: <input type="button" id="panel_button">...</button> Using a selector: function $(id) { return document.querySelector(id); } With an event handler: var button_ ...

Having trouble with the click button flip function? It seems to be working in one section but not in

Currently, I am facing an issue with a card section that contains two buttons and a description. The first button adds an image which is working perfectly fine, as well as the description section. On the other hand, the second button adds a video and when ...

Customize the appearance of every other column in an asp gridview

Looking for help with formatting rows and columns in an ASP GridView. The rows are automatically colored alternating, and I want to make the content in every first column bold and every second column normal. I have heard about using CSS nth-child() to achi ...

The text should be wrapped to overlap with an image positioned above it

Currently, I am in the process of enhancing a webpage that contains a significant amount of old legacy code. One issue I have encountered pertains to text wrapping within a fixed-height and width container, as illustrated in the image below: https://i.sst ...

Ways to dynamically toggle visibility and hide elements by clicking outside the specified div

I have a div that, when clicked, displays a contact us form. This form toggles between being visible and hidden. How can I make it hide when clicked on another part of the document? Here is the code: function showContactForm(){ var formWidth = &apos ...