alankish

Menu higlihting - CSS only

Mar 6th, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.32 KB | None | 0 0
  1. #menu
  2. {
  3.     position: relative;
  4.     left: 10px;
  5.     width: 960px;
  6.     height: 50px;
  7.     z-index: 10;
  8.     background: url(../images/menu-bg.png) repeat-x;
  9.     }
  10.  
  11. ul  {
  12.     list-style: none;
  13.     padding: 0;
  14.     margin: 0;
  15.     }
  16. #menu li {
  17.     position: relative;
  18.     float: left;
  19.     width: 120px;
  20.     font-family: Arial, sans-serif;
  21.     font-size: 14px;
  22.     color: #FFF;
  23.     line-height: 50px;
  24.     text-align: center;
  25.     }
  26. #menu ul li a {
  27.     display: block;
  28.     text-decoration: none;
  29.     color: #FFF;
  30.     }
  31.  
  32. #menu ul li a:hover{
  33.         background: url(../images/menu-hover.png) repeat-x;
  34.         }
  35.  
  36. #menu ul li ul li a:hover{
  37.         background: none;
  38.         }
  39.  
  40. div#menu  ul li:hover>li {
  41.     background: #FFF;
  42. }
  43.  
  44. #menu li:hover > a, #menu ul ul :hover > a {
  45.       background: url(../images/menu-hover.png) repeat-x;
  46.     }
  47. #menu li ul {
  48.     display: none;
  49.     position: absolute;
  50.     width: 100px;
  51.     top: 0;
  52.     left: 0;
  53.     margin-left: -1px;
  54.     }
  55. /* _#menu ul li a:hover { background: rgb(72, 72, 72); } to ne koristiti */
  56. #menu ul li ul li{
  57.     height: 30px;
  58.     width: 160px;
  59.     line-height: 30px;
  60.     background: rgb(72, 72, 72);
  61. }
  62. #menu li > ul {
  63.     top: auto;
  64.     left: auto;
  65.     background: rgb(72, 72, 72);
  66.     }
  67. #menu li:hover ul, li.hover ul {
  68.     display: block;
  69.     background: rgb(72, 72, 72);
  70.     }
  71.  
  72. #menu ul li.active a { background: rgb(72, 72, 72); }
  73.  
  74. #menu ul li.parent.active a { background: rgb(72, 72, 72); }
Advertisement
Add Comment
Please, Sign In to add comment