vonko1988

CSS_layout_homework_task1.css

Feb 16th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.01 KB | None | 0 0
  1. /*Removing the bullets for all menu items*/
  2.  
  3. ul {
  4.     list-style-type: none;
  5.     padding-left: 15px;
  6. }
  7.  
  8.  
  9. a {
  10.     text-decoration: none;
  11.     color: black;
  12.     font-size: 1.3em;
  13.     font-family: 'Times New Roman';
  14. }
  15.  
  16.     /*When we hover on a link
  17.  the link to become underlined*/
  18.  
  19.     a:hover {
  20.         text-decoration: underline;
  21.     }
  22.  
  23. /*Initially we want to hide the sub menus*/
  24.  
  25. ul li ul {
  26.     display: none;
  27. }
  28.  
  29. /*When we hover the mouse over the list item,
  30.   the menu inside it will become visible.
  31.   If we do not put it only for the direct child,
  32.   when you hover on the first list item all menus
  33.   below it will become visible. No matter
  34.   how many more sub menus you put inside
  35.   this will work*/
  36.  
  37.  
  38. ul li:hover > ul {
  39.     display: block;
  40. }
  41.  
  42. /*Some text styling for easy distinction of the
  43.   different sub-menus*/
  44.  
  45. ul ul li a {
  46.     color: #929292;
  47. }
  48.  
  49. ul ul ul li a {
  50.     color: blue;
  51. }
  52.  
  53. ul ul ul ul li a {
  54.     color: red;
  55. }
  56.  
  57. ul ul ul ul ul li a {
  58.     color: green;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment