home *** CD-ROM | disk | FTP | other *** search
/ PC User 2011 September / PCUser_Sept_2011.iso / interface / p7exp.css < prev    next >
Encoding:
Cascading Style Sheet File  |  2009-01-01  |  6.3 KB  |  191 lines

  1. /* 
  2.   ------------------------------------
  3.   PVII Menu CSS Express Drop-Down Menu
  4.   by Project Seven Development
  5.   www.projectseven.com
  6.   ------------------------------------
  7. */
  8. body {
  9.     font-family: Arial, Helvetica, sans-serif;
  10.     font-size: 100%;
  11.     background-color: #FFFFF;
  12.     margin: 24px 0;
  13.     padding: 0;
  14.  
  15.     background-image: ;
  16.     background-repeat: repeat;
  17.     color: #000;
  18. }
  19. /*
  20. Container for the menu. We set top and bottom borders only because the menu container
  21. stretches the entire window width. Note that this container can go inside a fixed width
  22. element that is centered on the page, if you so desire. It can even go inside a table cell.
  23. It carries a background image for aesthetics.
  24. */
  25. #menuwrapper {
  26.     background-color: #FFFFF;
  27.     background-image: url(../p7_cssexpress/images/p7exp_mbar.jpg);
  28.     background-repeat: repeat-x;
  29.     border-top-width: 0px;
  30.     border-bottom-width: 0px;
  31.     border-top-style: none;
  32.     border-bottom-style: none;
  33.     border-top-color: #000;
  34.     border-bottom-color: #000;
  35.  
  36. }
  37. /*Clears the floated menu items.
  38. Assigned to a BR tag placed just before
  39. menuwrapper's closing DIV tag*/
  40. .clearit {
  41.     clear: both;
  42.     height: 0;
  43.     line-height: 0.0;
  44.     font-size: 0;
  45. }
  46. /*
  47. p7menubar is the root UL and p7menubar ul applies to all the sub-menu ULs.
  48. We set padding and margin to zero to eliminate all indentation, turn bullets off,
  49. and set a font-family different from the global font-family declared for the
  50. body element above. This sets font for just the menu. Do not add a font-size here.
  51. */
  52. #p7menubar, #p7menubar ul {
  53.     padding: 0;
  54.     margin: 0;
  55.     list-style: none;
  56.     font-family: Arial, Helvetica, sans-serif;
  57. }
  58. /*
  59. Root-Level Links.  Do not change the first two properties.
  60. Adjust padding values to make the root links taller and to offset them
  61. from the left and right edges of the link box. The border right creates a
  62. separator between links. Font-size is set here and will apply to all menu levels.
  63. Font color is set to light gray.
  64. */
  65. #p7menubar a {
  66.     display: block;
  67.     text-decoration: none;
  68.     padding: 3px 10px 3px 10px;
  69.     font-size: 1em;
  70.     color: #CCCCCC;
  71.     border-right-width: 1px;
  72.     border-right-style: none;
  73.     border-right-color: #333;
  74.     font-weight: bold;
  75.     font-variant: normal;
  76.     background-color: #000000;
  77. }
  78. /*
  79. Class assigned to those Root-Level links that have associated Sub-Menus.
  80. The top and bottom padding assigned this element must be the same as
  81. that assigned to the p7menubar a element. The right padding is increased
  82. to accomodate the display of background image depicting a downward
  83. pointing arrow.
  84. */
  85. #p7menubar a.trigger {
  86.     padding: 3px 16px 3px 10px;
  87.     background-image: url(../p7_cssexpress/images/p7PM_dark_south.gif);
  88.     background-repeat: no-repeat;
  89.     background-position: right center;
  90. }
  91. /*
  92. The Root-Level list items. Floating left allows
  93. them to appear horizontally. Width is for IE5 Mac. The last rule in
  94. this style sheet will set the width for this element to auto for all
  95. other browsers - hiding it from IE5 Mac. The width is proportional.
  96. As you add and edit root menu items, you will need to test this width
  97. to ensure it is wide enough to accomodate all text.
  98. */
  99. #p7menubar li {
  100.     float: left;
  101.     width: 9em;
  102. }
  103. /*
  104. Sets width for Sub-Menu box and the List Items inside - in proportional em units. 
  105. This allows the sub-menu width to expand if users resize the text in their browsers.
  106. */
  107. #p7menubar li ul, #p7menubar ul li  {
  108.     width: 11em;
  109. }
  110. /*
  111. The sub-menu links. We set color and turn off the right border, which
  112. would otherwise be inherited from the root link rule. We set top and 
  113. bottom padding less than the root items and increas the left padding
  114. to indent the sub-menu links a small amount in from the root links.
  115. */
  116. #p7menubar ul li a  {
  117.     color: #565656;
  118.     border-right: 0;
  119.     padding: 3px 12px 3px 16px;
  120. }
  121. /*
  122. Sub-Menu Unordered Lists describes each dropdown sub-menu grouping. 
  123. Positioned Absolutely to allow them to appear below their root trigger.
  124. Set to display none to hide them until trigger is moused over.
  125. Background Color must be set or problems will be encountered in MSIE.
  126. Right and bottom borders are set to simulate a raised look.
  127. A gradient background image is assigned.
  128. */
  129. #p7menubar li ul {
  130.     position: absolute;
  131.     display: none;
  132.     background-color: #B1C3D9;
  133.     border-right: 1px solid #333333;
  134.     border-bottom: 1px solid #333333;
  135.     background-image: url(../p7_cssexpress/images/p7exp_mgrad.jpg);
  136.     background-repeat: repeat-x;
  137. }
  138. /*
  139. Changes the Text color and background color when the Root-Level
  140. menu items are moused over. The second selector sets color and background
  141. when Root-Level items are accessed with the keyboard tab key. The third
  142. selector sets an active state to support keyboard access in MSIE. The fourth 
  143. selector is assigned to IE5 and IE6 Windows via the P7_ExpMenu script.
  144. Note that IE7 supports hover on elements other than links and so behaves
  145. like Firefox, Opera, and Safari - making the menu operable even if JavaScript
  146. is not enabled.
  147. */
  148. #p7menubar li:hover a, #p7menubar a:focus,
  149. #p7menubar a:active, #p7menubar li.p7hvr a {
  150.     color: #D7D4E5;
  151.     background-color: #1B2A4C;
  152. }
  153. /*
  154. Set the Sub-Menu UL to be visible when its associated
  155. Root-Level link is moused over. The second selector is 
  156. assigned to IE5 and IE6 via the P7_ExpMenu script.
  157. */
  158. #p7menubar li:hover ul, #p7menubar li.p7hvr ul {
  159.     display: block;
  160. }
  161. /*
  162. Sets the Text color of the Sub-Level links when the Root-Level
  163. menu items are moused over. The second selector is 
  164. assigned to IE5 and IE6 via the P7_ExpMenu script.
  165. The color set should march the normal Sub-Level link color
  166. in the rule: #p7menubar ul li a. The background color must be
  167. transparent to allow the underlying gradient background on the UL
  168. to show through.
  169. */
  170. #p7menubar li:hover ul a, #p7menubar li.p7hvr ul a {
  171.     color: #000000;
  172.     background-color: transparent;
  173. }
  174. /*
  175. The normal hover class for Sub-Level links. The Important directive
  176. is required for older browsers. We set a background color, which shows
  177. over the gradient background. We set text color to white.
  178. */
  179. #p7menubar ul a:hover {
  180.     background-color: #D7D4E5!important;
  181.     color: #1B2A4C!important;
  182. }
  183. /* The single backslash \ character inside this comment
  184. causes IE5 Mac to ignore the following rule, which allows other
  185. browsers to render top-level menu items to their natural width.
  186. Do not edit this rule in any way. */
  187. #p7menubar li {width: auto;}
  188. .right_align {
  189.     color: #000;
  190. }
  191.