0

I need display submenu on click and now its on hover.

This is the actual code

    .nav .menu .child-sub-menu > li > a > span:nth-child(1),
    .nav .menu .sub-menu > li > a > span:nth-child(1),
    .nav .menu > li > a > span:nth-child(1) {
        float: left;
        margin: 0 .4em 0 0;
    }

    .nav .menu .child-sub-menu > li > a > span:nth-child(2),
    .nav .menu .sub-menu > li > a > span:nth-child(2),
    .nav .menu > li > a >span:nth-child(2) {
        float: right;
        margin: 0 0 0 1em;
    }

but I cant find the correct way

theduck
  • 2,589
  • 13
  • 17
  • 23
  • CSS alone can't do that. A similiar question was answered here: https://stackoverflow.com/questions/13630229/can-i-have-an-onclick-effect-in-css – dscham Sep 08 '19 at 01:47
  • hi, thanks for the answer but i see this on this youtube video youtube.com/watch?v=M1ljv_1U8OE and he can – Littlecodep Sep 08 '19 at 07:16
  • Like this is without javascript: https://jsfiddle.net/hb9tuaw5/ but added a HTML `` tag, so it's a hack, let me know if that would be a valid example (then I will elaborate it). Changes from your code are in `CSS line 80 - 97` and `HTML line 29` – caramba Sep 08 '19 at 12:26
  • thanks but i click and i display the first menu, but when i click again the menu don't work – Littlecodep Sep 08 '19 at 21:58

0 Answers0