473,811 Members | 3,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question ab my CSS menu? STUCK!

1 New Member
I am trying to create a dropdown menu using ONLY css. I am having a problem. I need to get the headings a different color and font than the subheadings. I need the heading to be white and have a hover of black text and white background. I need my subheading to be black, font verdana, size 10 and have a hover of #ace1f1. Right now, everytime I change one, the other changes as well. The list and CSS sheet is below. Thanks for the help!!

Here is my list:

Expand|Select|Wrap|Line Numbers
  1. <ul class="dropdown">
  2.   <li><a href="about_new.htm" >About Us</a>
  3. <ul class="dropdown">
  4.       <li><a href="corpgov_new.htm">Corporate Governance</a></li>
  5.       <li><a href="strategy_new.htm">Our Strategy</a></li>
  6.       <li><a href="strengths_new.htm">Our Strengths</a></li>
  7.       <li><a href="history_new.htm">Our History</a></li>
  8.     </ul>
  9.   </li>
  10.   <li><a href="caution_new.htm" class="dropdown">Investor Relations</a></li>
  11.   <li><a href="site_new.htm">Site Map</a></li>
  12.   <li><a href="info_new.htm">Contact Us</a>
  13. <ul>
  14.       <li><a href="info_new.htm">Information Request</a></li>
  15.       <li><a href="add_new.htm">Add/Remove Me to E-mail List</a></li>
  16.       <li class="dropdown"><a href="career_new.htm">Career Opportunities</a></li>
  17.     </ul>
  18.   </li>
  19. </ul>


Here is my CSS sheet

Expand|Select|Wrap|Line Numbers
  1. ul.dropdown {
  2.     background-color: #006699;
  3.     float: none;
  4.     list-style-image: none;
  5.     list-style-type: none;
  6.     position: relative;
  7.     z-index: 597;
  8.     width: 826px;
  9.     vertical-align: middle;
  10.     word-spacing: normal;
  11.     visibility: visible;
  12.     color: #000;
  13.     font-family: Arial, Helvetica, sans-serif;
  14.     white-space: nowrap;
  15.     letter-spacing: normal;
  16.     text-indent: 0%;
  17.     font-size: 12px;
  18.     font-weight: bold;
  19.     padding: 0px;
  20.     margin-top: -7px;
  21.     margin-right: 0px;
  22.     margin-bottom: 0px;
  23.     margin-left: -207.75px;
  24.     page-break-before: auto;
  25.     page-break-after: auto;
  26. }
  27.  
  28. ul.dropdown a:link {
  29.     font-family: Arial, Helvetica, sans-serif;
  30.     color: #000;
  31.     text-decoration: none;
  32.     font-size: 12px;
  33.     font-style: normal;
  34.     text-align: left;
  35.     border-bottom-style: none;
  36.     border-top-style: none;
  37.     border-right-style: none;
  38.     border-left-style: none;
  39. }
  40. ul.dropdown li:hover {
  41.     background-color: #ace1f1;
  42.     position: relative;
  43.     z-index: 599;
  44.     color: #000;
  45.     font-family: Arial, Helvetica, sans-serif;
  46.     background-position: center;
  47. }
  48. ul.dropdown a:visited {
  49.     font-family: Arial, Helvetica, sans-serif;
  50.     color: #000;
  51.     text-decoration: none;
  52.     font-size: 12px;
  53.     font-style: normal;
  54.     text-align: left;
  55.     border-bottom-style: none;
  56. }
  57.  
  58.  
  59. ul.dropdown a:hover {
  60.     color: #FFF;
  61.     text-decoration: none;
  62.     display: block;
  63.     font-family: Arial, Helvetica, sans-serif;
  64.     background-color: #ace1f1;
  65.     visibility: visible;
  66. }
  67. ul.dropdown li {
  68.     line-height: 1.3em;
  69.     vertical-align: middle;
  70.     float: left;
  71.     padding-top: 7px;
  72.     padding-right: 69px;
  73.     padding-bottom: 7px;
  74.     padding-left: 69px;
  75.     border-right-width: 0px;
  76.     border-right-style: none;
  77.     border-right-color: #999999;
  78.     list-style-image: none;
  79.     list-style-type: none;
  80.     color: #FFF;
  81.     text-align: left;
  82.     margin: 0px;
  83.     font-size: 12px;
  84. }
  85.  
  86. ul.dropdown ul {
  87.     background-color: #EEEDED;
  88.     margin: 0px;
  89.     width: 206.5px;
  90.     list-style-image: none;
  91.     list-style-type: none;
  92.     position: absolute;
  93.     visibility: hidden;
  94.     z-index: 598;
  95.     left: 0%;
  96.     top: 100%;
  97.     float: left;
  98.     text-align: left;
  99.     padding-top: 0px;
  100.     padding-right: 10px;
  101.     padding-bottom: 0px;
  102.     padding-left: 10px;
  103.     font-family: Arial, Helvetica, sans-serif;
  104.     font-size: 12px;
  105.     color: #000;
  106. }
  107. ul.dropdown.li {
  108.     line-height: 1.3em;
  109.     vertical-align: middle;
  110.     margin: 0px;
  111.     float: left;
  112.     padding-top: 7px;
  113.     padding-right: 20px;
  114.     padding-bottom: 7px;
  115.     padding-left: 10px;
  116.     border-right-width: 1px;
  117.     border-right-style: solid;
  118.     border-right-color: #999999;
  119.     list-style-image: none;
  120.     list-style-type: none;
  121.     border-top-style: none;
  122.     border-bottom-style: none;
  123.     border-left-style: none;
  124.     text-align: right;
  125.     width: 300px;
  126.     font-family: Arial, Helvetica, sans-serif;
  127.     position: relative;
  128.     font-size: 14px;
  129.     color: #FFF;
  130. }
  131. ul dropdown li:hover {
  132.     background-color: #ace1f1;
  133.     position: relative;
  134.     z-index: 599;
  135. }
  136. ul.dropdown li:hover > ul {
  137.     visibility: visible;
  138.     background-color: #eeeded;
  139. }
  140. ul.dropdown ul li {
  141.     float: none;
  142.     border-top-style: none;
  143.     border-right-style: none;
  144.     border-bottom-style: solid;
  145.     border-left-style: none;
  146.     text-align: left;
  147.     border-bottom-width: 1px;
  148.     border-bottom-color: #ace1f1;
  149.     padding-right: 30px;
  150.     padding-left: 5px;
  151.     background-color: #eeeded;
  152.     font-family: Arial, Helvetica, sans-serif;
  153.     font-size: 12px;
  154.     color: #FFF;
  155. }
  156. ul.dropdown {
  157.     background-color: #006699;
  158.     float: left;
  159.     list-style-image: none;
  160.     list-style-type: none;
  161.     position: relative;
  162.     z-index: 597;
  163.     color: #FFF;
  164.     overflow: visible;
  165.     left: 25%;
  166.     top: 0px;
  167.     right: 25%;
  168.     bottom: 0px;
  169.     font-size: 12px;
  170.     background-image: none;
  171. }
Oct 21 '09 #1
0 1378

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1662
by: elad | last post by:
Hi I'm working with HV Menu 5.5 (downloaded from www.dynamicdrive.com ) I'm using it with 2 horizontal frames. The menu works great if the FirstLineFrame and SecLineFrame are the same (The first level menu and sub level menu appears in the menu frame) But when I change the SecLineFrame to be the same as DocTargetFrame ( sub level menu appear in the target framemenu ) and choose item in the menu the doc opened and the menu get stuck.
13
5035
by: elad | last post by:
Hi The Menu doesn't work properly when I have 2 frame and the Menu popup frame=document target frame, when I choose item in the menu the doc opened and the menu get stuck. Here is the code I'm using: FrameSet ------------------------------------------------------- <html>
0
1621
by: der kommissar | last post by:
Hi all I'm having a small problem with a navigation menu on a site i'm doing. The address of the site is: http://www.statik.be/radiomol/ All works perfectly fine in FireFox, Opera and Safari, but IE behaves differently:
0
1760
by: Derrick | last post by:
I'm trying to calculate the height of a context menu in a manner that will work in both the full framework (where the calculation is easier because of the MeasureItem event of a MenuItem) and the compact framework (no MeasureItem event, which is why I'm stuck). I have a button that, when pressed, shows a context menu that the user is to make a selection from. Right now, I am always showing the menu below the button, but this is...
7
2861
by: zorhel | last post by:
Hi. I will do a dynamic menu for a asp.net app.. I don't know yet if how I will get the data for populate this menu: from a sql server database, xml file or what, but I know it will be dynamic any probably encapsulated in a control (user or custom). Someone have any logic code, samples, links for that? Thanks Zorhel
5
3868
by: james | last post by:
Hello, I am having a little trouble creating an event handler for a context menu toolstripmenuitem. I've seen various tutorials and so on, but I keep getting a bit stuck! So far I have a second class defining the eventargs I want to use: public class ApptEventArgs : EventArgs{ public int ApptUID; public String ApptOp;
0
4539
by: benfly08 | last post by:
Hi, I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item. However, when I code selection event, i cannot access to the list i pass in. Anybody got idea? Below is the code. public static void setUpMenu(final Shell shell, Menu popUpMenu, final String clientId) { myShell = shell; ...
6
1402
by: deltamami0999 | last post by:
I just received this e-mail from a colleague of mine that got stuck and she sent it to me and i'm stuck....we're wondering what this is all about.....can anyone help? Inventory Management System The inventory management system is designed to be used primarily by warehouse workers. The system must use a simple command line driven interface as the only method of interaction will be by keyboard.
19
3716
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the code for this from a tutorial but that menu was flush-left justified. Not what I want. Subsequent searches on google on how to center yielded a
0
9730
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.