AngelDisc Posted March 31, 2011 Share Posted March 31, 2011 Bonjour.Je pense que le titre dit tous. Je cherche quand je click sur mon menu, a afficher la div en question et masquer les autres. <html> <head> <style> body { font-size : 10pt; font-family : arial; } #menumanager { float: left; height: 31px; line-height: normal; margin: 0; padding: 0; width: 100%; } #menumanager a { display: block; float: left; font-family: Arial, Helvetica, sans-serif; font-size: 1em; padding: 10px; } #menumanager li { float: left; list-style: none outside none; margin: 0; padding: 0; } #page_module { margin:0; padding:0; border: 1px solid #999999; clear: left; } </style> [removed] [removed] </head> <body> test 1 test 2 test 3 test 1 ok test 2 ok test 3 ok </body> </html> Je pense que celà peut ce faire par javascript, mais comment faire ?Merci et bon dev Link to comment Share on other sites More sharing options...
ckarone Posted March 31, 2011 Share Posted March 31, 2011 C'est pour le menu des catégorie ? Link to comment Share on other sites More sharing options...
AngelDisc Posted March 31, 2011 Author Share Posted March 31, 2011 Non du tout . c'est pour créer un menu dans un module.la solution est trouvé <html> <head> <style> body { font-size : 10pt; font-family : arial; } #menumanager { float: left; height: 31px; line-height: normal; margin: 0; padding: 0; width: 100%; } #menumanager a { display: block; float: left; font-family: Arial, Helvetica, sans-serif; font-size: 1em; padding: 10px; } #menumanager li { float: left; list-style: none outside none; margin: 0; padding: 0; } #page_module { margin:0; padding:0; border: 1px solid #999999; clear: left; } </style> [removed] <!--// [CDATA[ function div1affiche(){ document.getElementById("test1").style.display = "block"; document.getElementById("test2").style.display = "none"; document.getElementById("test3").style.display = "none"; } function div2affiche(){ document.getElementById("test1").style.display = "none"; document.getElementById("test2").style.display = "block"; document.getElementById("test3").style.display = "none"; } function div3affiche(){ document.getElementById("test1").style.display = "none"; document.getElementById("test2").style.display = "none"; document.getElementById("test3").style.display = "block"; } // ]] --> [removed] </head> <body> test 1 test 2 test 3 test 1 ok test 2 ok test 3 ok </body> </html> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now