1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
<body> <ul> <li> Personal <div class="dropDown"> <div class="listItem">personal1</div> <div class="listItem">personal2</div> <div class="listItem">personal1</div> <div class="listItem">personal2</div> </div> </li> <li> Car <div class="dropDown"> <div class="listItem">car1</div> <div class="listItem">car2</div> </div> </li> <li> menu header 3 <div class="dropDown"> <div class="listItem">menu item</div> <div class="listItem">menu item</div> </div> </li> <li> menu header 4 <div class="dropDown"> <div class="listItem">menu item</div> <div class="listItem">menu item</div> </div> </li> </ul> </body> </html> <style> body { font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 20px 50px 150px; font-size: 13px; text-align: center; background: #E3CAA1; } ul { width:100%; position:relative; text-align: left; display: inline; margin: 0; padding: 15px 4px 17px 0; list-style: none; -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); } ul li { width:auto; font: bold 18px/18px sans-serif; display: inline-block; margin-right: -4px; padding: 15px 20px; background: #fff; cursor: pointer; -webkit-transition: all 0.2s; -moz-transition: all 0.2s; -ms-transition: all 0.2s; -o-transition: all 0.2s; transition: all 0.2s; } ul li:hover { background: #555; color: #fff; } ul li .dropDown { padding: 0; position: absolute; top: 44px; left: 0; width: 100%; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; display: none; opacity: 0; visibility: hidden; -webkit-transiton: opacity 0.2s; -moz-transition: opacity 0.2s; -ms-transition: opacity 0.2s; -o-transition: opacity 0.2s; -transition: opacity 0.2s; } ul li .dropDown .listItem { background: #555; display: block; color: #fff; text-shadow: 0 -1px 0 #000; padding: 10px; } ul li .dropDown .listItem:hover { background: #666; } ul li:hover .dropDown { display: block; opacity: 1; visibility: visible; } </style> |
Latest Snippets
- Exclude category from blog while adding them to sitemap.xml 16th January 2024
- What Router can I use with Onestream Broadband? 28th June 2023
- Firefox 113 (2023) Tabs on top/bottom not working fixed again 18th May 2023
- Disable buying – Woocommerce 25th April 2023
- Windows Desktop Wallpaper Background for OCD users with shelves 13th April 2023
- Featured Image Admin Thumb – Working Plugin (WordPress 6.2) 6th April 2023
- Create a gallery in a Posts page 3rd March 2023
- Clickable elements too close together – Solved 21st February 2023
- Best ChatGPT Prompts 24th January 2023
- Make Elementor Accordion Closed by Default 13th January 2023
LINKS