Ciao a tutti,
sto costruendo un menu su più livelli responsive. Il problema è che, nel formato su smartphone, non riesco a mettere la tendina fissa.
Ecco il codice nella parte del layout per pc:
codice:ul ul { padding: 0; width: 155px; display: inline-block; list-style: none; opacity: 0; visibility: hidden; position: absolute; top: 26px; left: -10px; z-index: 9999; background-color: rgba(181,175,164,1.00); -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -ms-transition: all 0.3s ease; -o-transition: all 0.3s ease; transition: all 0.3s ease; height: 140px; } ul li:hover ul { opacity: 1; visibility: visible; display: block; } ul ul li { float: none; display: block; border: 0; margin-top: 8px; } ul ul a { width: 138px; display: block; white-space: nowrap; text-transform: none; margin-left: auto; margin-right: auto; font-size: 14px; line-height: 30px; text-align: center; }
Ecco il codice nella parte del layout per gli smartphone:
codice:ul ul { width: 158px; visibility: visible; position: relative; display: table; top: 30px; left: 0px; z-index: 9999; background-color: rgba(181,175,164,1.00); -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -ms-transition: all 0.3s ease; -o-transition: all 0.3s ease; transition: all 0.3s ease; height: 158px; } ul ul li { float: none; display: table; border: 0; margin-top: 8px; } ul ul a { width: 158px; display: table; white-space: nowrap; text-transform: none; margin-left: auto; margin-right: auto; font-size: 14px; line-height: 30px; text-align: center; }
Qualcuno riesce ad aiutarmi? cosa sbaglio?
Grazie

Rispondi quotando