Tags: Menu

Sort by: Date / Title /

  1. 10 years ago by stephane
    This code using html & css is very useful if you want to display this kind of menu! go to the adress of this source to see the demo or copy paste it in a htm file...
    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2. <html xmlns="http://www.w3.org/1999/xhtml" lang="fr">                               
    3.   <head>                                                         
    4.     <meta content="text/html; charset=UTF-8" http-equiv="content-type" />                                                           
    5.     <title>:: Demo dropdown nav menu without js ::</title>
    6.     <style type="text/css">
    7.  
    8.  
    9. /* ================================================================
    10. This copyright notice must be untouched at all times.
    11.  
    12. The original version of this stylesheet and the associated (x)html
    13. is available at http://www.cssplay.co.uk/menus/final_drop.html
    14. Copyright (c) 2005-2008 Stu Nicholls. All rights reserved.
    15. This stylesheet and the associated (x)html may be modified in any
    16. way to fit your requirements.
    17. =================================================================== */
    18.  
    19. .menu {width:745px; height:32px; position:relative; z-index:100;border-right:1px solid #000; font-family:arial, sans-serif;}
    20. /* hack to correct IE5.5 faulty box model */
    21. * html .menu {width:746px; w\idth:745px;}
    22. /* remove all the bullets, borders and padding from the default list styling */
    23. .menu ul {padding:0;margin:0;list-style-type:none;}
    24. .menu ul ul {width:149px;}
    25. /* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
    26. .menu li {float:left;width:149px;position:relative;}
    27. /* style the links for the top level */
    28. .menu a, .menu a:visited {display:block;font-size:12px;text-decoration:none; color:#fff; width:138px; height:30px; border:1px solid #000; border-width:1px 0 1px 1px; background:#09c; padding-left:10px; line-height:29px; font-weight:bold;}
    29. /* a hack so that IE5.5 faulty box model is corrected */
    30. * html .menu a, * html .menu a:visited {width:149px; w\idth:138px;}
    31.  
    32. /* style the second level background */
    33. .menu ul ul a.drop, .menu ul ul a.drop:visited {background:#d4d8bd url(http://www.cssplay.co.uk/menus/breadcrumbs/grey-arrow.gif) no-repeat 130px center;}
    34. /* style the second level hover */
    35. .menu ul ul a.drop:hover{background:#c9ba65 url(http://www.cssplay.co.uk/menus/breadcrumbs/blue-arrow.gif) no-repeat 130px center;}
    36. .menu ul ul :hover > a.drop {background:#c9ba65 url(http://www.cssplay.co.uk/menus/breadcrumbs/blue-arrow.gif) no-repeat 130px center;}
    37. /* style the third level background */
    38. .menu ul ul ul a, .menu ul ul ul a:visited {background:#e2dfa8;}
    39. /* style the third level hover */
    40. .menu ul ul ul a:hover {background:#b2ab9b;}
    41.  
    42.  
    43. /* hide the sub levels and give them a positon absolute so that they take up no room */
    44. .menu ul ul {visibility:hidden;position:absolute;height:0;top:31px;left:0; width:149px;border-top:1px solid #000;}
    45. /* another hack for IE5.5 */
    46. * html .menu ul ul {top:30px;t\op:31px;}
    47.  
    48. /* position the third level flyout menu */
    49. .menu ul ul ul{left:149px; top:-1px; width:149px;}
    50.  
    51. /* position the third level flyout menu for a left flyout */
    52. .menu ul ul ul.left {left:-149px;}
    53.  
    54. /* style the table so that it takes no ppart in the layout - required for IE to work */
    55. .menu table {position:absolute; top:0; left:0; border-collapse:collapse;;}
    56.  
    57. /* style the second level links */
    58. .menu ul ul a, .menu ul ul a:visited {background:#d4d8bd; color:#000; height:auto; line-height:1em; padding:5px 10px; width:128px;border-width:0 1px 1px 1px;}
    59. /* yet another hack for IE5.5 */
    60. * html .menu ul ul a, * html .menu ul ul a:visited {width:150px;w\idth:128px;}
    61.  
    62. /* style the top level hover */
    63. .menu a:hover, .menu ul ul a:hover{color:#000; background:#b7d186;}
    64. .menu :hover > a, .menu ul ul :hover > a {color:#000; background:#b7d186;}
    65.  
    66. /* make the second level visible when hover on first level list OR link */
    67. .menu ul li:hover ul,
    68. .menu ul a:hover ul{visibility:visible; }
    69. /* keep the third level hidden when you hover on first level list OR link */
    70. .menu ul :hover ul ul{visibility:hidden;}
    71. /* make the third level visible when you hover over second level list OR link */
    72. .menu ul :hover ul :hover ul{ visibility:visible;}
    73.  
    74. </style>
    75.  
    76.   </head>
    77. <div class="menu">
    78.  
    79. <li><a href="../menu/index.html">DEMOS<!--[if IE 7]>
    80. <!-->
    81. </a><!--<![endif]-->
    82. <!--[if lte IE 6]>
    83. <table><tr><td><![endif]-->
    84.  
    85.         <ul>
    86.         <li><a href="../menu/zero_dollars.html">zero dollars advertising page</a></li>
    87.         <li><a href="../menu/embed.html">wrapping text around images</a></li>
    88.         <li><a href="../menu/form.html">styled form</a></li>
    89.         <li><a href="../menu/nodots.html">active focus</a></li>
    90.  
    91.         <li><a class="drop" href="../menu/hover_click.html">hover/click with no borders<!--[if IE 7]>
    92. <!-->
    93. </a><!--<![endif]-->
    94.  
    95. <!--[if lte IE 6]>
    96. <table><tr><td><![endif]-->
    97.                 <ul>
    98.                         <li><a href="../menu/form.html">styled form</a></li>
    99.                         <li><a href="../menu/nodots.html">removing active/focus borders</a></li>
    100.                         <li><a href="../menu/hover_click.html">hover/click</a></li>
    101.                 </ul>
    102.  
    103. <!--[if lte IE 6]>
    104. </td></tr></table></a><![endif]-->
    105.         </li>
    106.  
    107.         <li><a class="drop" href="../menu/shadow_boxing.html">shadow boxing<!--[if IE 7]>
    108. <!-->
    109. </a><!--<![endif]-->
    110. <!--[if lte IE 6]>
    111. <table><tr><td><![endif]-->
    112.                 <ul>
    113.                         <li><a href="../menu/form.html">styled form</a></li>
    114.                         <li><a href="../menu/nodots.html">removing active/focus borders</a></li>
    115.                         <li><a href="../menu/hover_click.html">hover/click</a></li>
    116.  
    117.                 </ul>
    118.  
    119. <!--[if lte IE 6]>
    120. </td></tr></table></a><![endif]-->
    121.         </li>
    122.         <li><a class="drop" href="../menu/old_master.html">image map for detailed information<!--[if IE 7]>
    123. <!-->
    124. </a><!--<![endif]-->
    125. <!--[if lte IE 6]>
    126. <table><tr><td><![endif]-->
    127.                 <ul>
    128.                         <li><a href="../menu/form.html">styled form</a></li>
    129.                         <li><a href="../menu/nodots.html">removing active/focus borders</a></li>
    130.                         <li><a href="../menu/hover_click.html">hover/click</a></li>
    131.  
    132.                 </ul>
    133. <!--[if lte IE 6]>
    134. </td></tr></table></a><![endif]-->
    135.         </li>
    136.         <li><a href="../menu/bodies.html">fun with background images</a></li>
    137.         <li><a href="../menu/fade_scroll.html">fade scrolling</a></li>
    138.         <li><a href="../menu/em_images.html">em image sizes compared</a></li>
    139.  
    140.         </ul>
    141.  
    142. <!--[if lte IE 6]>
    143. </td></tr></table></a><![endif]-->
    144. </li>
    145. <li><a href="../boxes/index.html">BOXES<!--[if IE 7]>
    146. <!-->
    147. </a><!--<![endif]-->
    148. <!--[if lte IE 6]>
    149. <table><tr><td><![endif]-->
    150.         <ul>
    151.         <li><a href="spies.html">a coded list of spies</a></li>
    152.         <li><a href="vertical.html">vertical menu</a></li>
    153.         <li><a href="expand.html">enlarging unordered list</a></li>
    154.         <li><a href="enlarge.html">link images</a></li>
    155.  
    156.         <li><a href="cross.html">non-rectangular</a></li>
    157.         <li><a href="jigsaw.html">jigsaw links</a></li>
    158.         <li><a href="circles.html">circular links</a></li>
    159.         </ul>
    160. <!--[if lte IE 6]>
    161. </td></tr></table></a><![endif]-->
    162. </li>
    163. <li><a href="../mozilla/index.html">MOZILLA<!--[if IE 7]>
    164. <!-->
    165. </a><!--<![endif]-->
    166. <!--[if lte IE 6]>
    167. <table><tr><td><![endif]-->
    168.         <ul>
    169.  
    170.         <li><a href="../mozilla/dropdown.html">drop down menu</a></li>
    171.         <li><a href="../mozilla/cascade.html">cascading menu</a></li>
    172.         <li><a href="../mozilla/content.html">content:</a></li>
    173.         <li><a href="../mozilla/moxbox.html">mozzie box</a></li>
    174.         <li><a href="../mozilla/rainbow.html">I can build a rainbow with transparent borders</a></li>
    175.         <li><a href="../mozilla/snooker.html">a snooker cue using border art</a></li>
    176.  
    177.         <li><a href="../mozilla/target.html">target practise</a></li>
    178.         <li><a href="../mozilla/splittext.html">two tone headings</a></li>
    179.         <li><a href="../mozilla/shadow_text.html">shadow text</a></li>
    180.         </ul>
    181. <!--[if lte IE 6]>
    182. </td></tr></table></a><![endif]-->
    183. </li>
    184. <li><a href="../ie/index.html">EXPLORER</a></li>
    185.  
    186. <li><a href="../opacity/index.html">OPACITY<!--[if IE 7]>
    187. <!-->
    188. </a><!--<![endif]-->
    189.  
    190. <!--[if lte IE 6]>
    191. <table><tr><td><![endif]-->
    192.         <ul>
    193.         <li><a href="../opacity/colours.html">a colour wheel using opaque colours</a></li>
    194.         <li><a href="../opacity/picturemenu.html">a menu using opacity</a></li>
    195.         <li><a href="../opacity/png.html">partial opacity</a></li>
    196.         <li><a href="../opacity/png2.html">partial opacity II</a></li>
    197.  
    198.         <li><a class="drop" href="../menu/hover_click.html">HOVER/CLICK<!--[if IE 7]>
    199. <!-->
    200. </a><!--<![endif]-->
    201.  
    202. <!--[if lte IE 6]>
    203. <table><tr><td><![endif]-->
    204.                 <ul class="left">
    205.                         <li><a href="../menu/form.html">styled form</a></li>
    206.                         <li><a href="../menu/nodots.html">removing active/focus borders</a></li>
    207.                         <li><a href="../menu/hover_click.html">hover/click</a></li>
    208.                 </ul>
    209.  
    210. <!--[if lte IE 6]>
    211. </td></tr></table></a><![endif]-->
    212.         </li>
    213.  
    214.         </ul>
    215. <!--[if lte IE 6]>
    216. </td></tr></table></a><![endif]-->
    217. </li>
    218. </ul>
    219.  
    220. </div>
    221.  
    222.  
    223. </body>
    224. </html>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1402"></script>
  2. 10 years ago by angenoir
    Menu déroulant utilisant la librairie Javascript Jquery
    1. <script src="http://iscripting.net/jquery/jquery_1.2.1.js"></script>
    2. <script>
    3. $(document).ready(function(){
    4.  
    5. $("#drop_down").hide();
    6. $("#drop_down").animate({
    7.  
    8. opacity:0.5
    9.  
    10. });
    11.  
    12.  
    13. $("a:contains('blah')").mouseover(function() {
    14.  
    15. $("#drop_down").show("slow");
    16.  
    17. });
    18.  
    19. $("#drop_down").mouseout(function(){
    20.  
    21. $(this).hide('slow');
    22.  
    23. });
    24.  
    25.  
    26.  
    27. });
    28. </script>
    29. <style>
    30. #drop_down {
    31. background:olive;
    32. width:100px;
    33. height:200px;
    34. z-index:1;
    35. }
    36.  
    37. #hori_menu {
    38. height:60px;
    39. border: 2px solid #EEEEEE;
    40. width:400px;
    41. }
    42. </style>
    43.  
    44. <div id="hori_menu">
    45. <a href="#">Google</a>
    46. <br />
    47. <div id="drop_down">
    48. Bleh<br />
    49. Blub<br />
    50. Burp<br />
    51.  
    52. Items
    53. </div>
    54. </div>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/952"></script>
  3. 11 years ago by daoro
    1. /* Pour le code xhtml voir plus tout en bas */
    2. /******** MENU ********/
    3. #nav {
    4. height: 25px !important;  /* Hauteur de la barre de menu*/
    5. background: url(images/bg_barre.png) repeat-x; /* Fond d'écran de la barre' */
    6. padding: 0 0 0 12px; /* Marge interne pour décaler les boutons et afficher la barre. Taille = (largeur totale - largeur des boutons)/2 */
    7. border-right: 1px #e7e2cb solid; /* Liaison header <--> contenu */
    8. border-left: 1px #e7e2cb solid;
    9. }
    10.  
    11. #menu {
    12. margin: 0;
    13. width: 776px; /* Taille des boutons */
    14. height: 25px; /* Hauteur de mes boutons */
    15. list-style: none; /* Ne pas afficher les puces */
    16. display: inline; /* Mode en ligne */
    17. overflow: hidden; /* Si le texte sort du cadre, ne pas l'afficher*/
    18. text-indent: -1000px; /* On fait disparaitre le texte en décalant de 1000px la première ligne. Il sort du cadre, et disparait */
    19. }
    20.  
    21. #menu li {
    22. margin: 0;
    23. padding: 0;
    24. list-style: none; /* cf. ci-dessus, nécessaire pour un affichage correct */
    25. display: inline;
    26. }
    27.  
    28. #menu a {
    29. float: left;
    30. padding: 0;
    31. overflow: hidden;
    32. width: 194px !important;
    33. }
    34.  
    35. #menu a:hover {
    36. background-position: 0 -25px; /* Décalage pour faire réagir l'image au survol de la souris */
    37. }
    38.  
    39.  
    40. /******* ITEMS DU MENU ******/
    41. #home a {
    42. height: 25px; /* Hauteur du bouton */
    43. width: 194px; /* Largeur du bouton */
    44. background: url(images/home.png) top left no-repeat; /* Image du bouton */
    45. }       
    46.  
    47. #about a {
    48. height: 25px;
    49. width: 194px;
    50. background: url(images/about.png) top left no-repeat;
    51. }       
    52.  
    53. #time a {
    54. height: 25px;
    55. width: 194px;
    56. background: url(images/time.png) top left no-repeat;
    57. }
    58.  
    59. #date a {
    60. height: 25px;
    61. width: 194px;
    62. background: url(images/date.png) top left no-repeat;
    63. }
    64. </style>
    65.  
    66. /* Le menu lui-même (sémantiquement correct)
    67. <div id="nav">
    68. <ul id="menu">
    69. <li id="home"><a href="#">Home</a></li>
    70. <li id="about"><a href="#">About</a></li>
    71. <li id="time"><a href="#">Time</a></li>
    72. <li id="date"><a href="#">Date</a></li>
    73. </ul>
    74. </div>
    75. */
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/150"></script>
  4. sponsorised links

First / Previous / Next / Last / Page 1 of 1 (3 posteets)