Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2003
    Messaggi
    1,258

    sottomenu che non sparisce

    Ciao a tutti, come faccio se non voglio il sottomenu sulla destra sempre presente? In questo momento la voce corrente è la prima, quindi non vorrei il sottomenu sulla destra relativa alla voce 2. grazie.

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it" dir="ltr">
    
    <head>
    
    	<title>Figura 5.18</title>
    
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
    	<meta name="MSSmartTagsPreventParsing" content="TRUE" />
    
    	<style type="text/css">
    
    	/*<![CDATA[*/
    
    	<!--
    
    body{
    
    background:#FFF;
    
    color:#000;
    
    font:80% Verdana,Geneva,Arial,Helvetica,sans-serif;
    
    }
    
    .menuNavigazione{
    
    margin:0;
    
    padding:5px 0;
    
    width:200px;
    
    list-style:none;
    
    border-left:1px solid #999;
    
    border-right:1px solid #999;
    
    position:relative;
    
    }
    
    .menuNavigazione li.voceCorrente a{
    
    border-left:0.5em solid #999;
    
    font-weight:bold;
    
    }
    
    .menuNavigazione li.voceCorrente ul a{
    
    border-left:none;
    
    font-weight:normal;
    
    }
    
    .menuNavigazione li.voceCorrente li{
    
    font-weight:normal;
    
    }
    
    .menuNavigazione ul{
    
    margin:0;
    
    padding:5px 0;
    
    width:200px;
    
    list-style:none;
    
    position:absolute;
    
    left:201px;
    
    top:0;
    
    }
    
    .menuNavigazione a{
    
    background:#FFF;
    
    color:#000;
    
    display:block;
    
    padding:5px 1em;
    
    text-decoration: underline;
    
    }
    
    .menuNavigazione ul a{
    
    font-size:80%;
    
    }
    
    .menuNavigazione a:hover,
    
    .menuNavigazione a:focus,
    
    .menuNavigazione a:active{
    
    color:#C00;
    
    background:#FFF;
    
    }
    
    	-->
    
    	/*]]>*/
    
    	</style>
    
    	
    
    </head>
    
    <body>
    
    <ul class="menuNavigazione">
    
    	<li class="voceCorrente">Prima Voce
    
    	[*]Seconda Voce
    
    		<ul>
    
    			[*]Prima Sotto Voce
    
    			[*]Seconda Sotto Voce
    
    			[*]Terza Sotto Voce
    
    		[/list]
    
    	
    
    	[*]Terza Voce
    
    	[*]Quarta Voce
    
    	[*]Quinta Voce
    [/list]
    
    </body>
    
    </html>
    
    
    j

  2. #2
    Moderatrice di CSS L'avatar di ResianTaxidrive
    Registrato dal
    Oct 2007
    residenza
    Udine
    Messaggi
    2,766
    puoi fare

    .menuNavigazione li ul{
    display:none;
    }

    .menuNavigazione li.voceCorrente ul{
    display:block;
    }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.