razu788

CSS dropdown

Oct 11th, 2020
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. body {
  2. margin:0;
  3. padding:0;
  4. }
  5.  
  6. .main {
  7. background:#E75926;
  8.  
  9. }
  10.  
  11. .main ul {
  12.  
  13. list-style:none;
  14. margin:0;
  15. padding:0;
  16.  
  17. }
  18.  
  19. .main ul:after {
  20. content: "";
  21. display:block;
  22. clear: both;
  23. }
  24.  
  25. .main ul li {
  26. float: left;
  27. padding: 0px 25px 0 25px;
  28. position: relative;
  29. }
  30.  
  31. .main ul li a {
  32. text-decoration: none;
  33. font-family: tahoma;
  34. font-size: 19px;
  35. color: white;
  36.  
  37.  
  38.  
  39. }
  40.  
  41. .main ul li:hover {
  42. background:#71BA51
  43. }
  44.  
  45. .main ul ul li {
  46. float: none ;
  47. background: #EB9532;
  48. }
  49.  
  50. .main ul ul {
  51.  
  52. position: absolute;
  53. top: 100%;
  54. left: 0px;
  55. display: none;
  56.  
  57. }
  58.  
  59. .main ul li:hover>ul{
  60. display: block;
  61. }
  62.  
  63. .main ul ul ul {
  64. position: absolute;
  65. top: 0px;
  66. left:100%;
  67. }
  68.  
  69. .main ul ul ul li {
  70. background: blue;
  71. }
  72.  
  73. .main ul ul ul ul li {
  74.  
  75. background:#E7DF86;
  76. }
  77.  
  78. .main ul ul ul ul {
  79. position: absolute;
  80. top: 0;
  81. left: 100%;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment