PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 8, 2022

[FIXED] Why is the site navigation collapsing so fast?

 November 08, 2022     css, html, javascript, magento, menu     No comments   

Issue

When you look at the menu of this website: https://www.eurotuin.be/

And when you try to hover it, it collapses really fast. see the menu here

I've tried experimenting with the following code, but it doesn't seem to work:

.main-nav__link {
    transition:all 0s ease 0s!important;
}

This one has same effect:

.main-nav__link {
    transition:all 3s ease 3s!important;
}

Solution

Two things :

  • How transition would have any effect if duration is 0s (I'm no expert, this is a genuine question) ? Plus the transition is applied on your link, it wouldn't have any effect on your menu (which is a different element).

  • So the issue here is : your menu is shown/hidden with the change of the display property from none to block.

More precisly, .hide() and .show() are applied to the menu element on mouseout and mouseover events (from the li element). So the menu 'hide' and 'show' as soon as the mouse enter or exit the li element.

Also be aware that the display property can't be animated or transitioned.



Answered By - learner
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing