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: - <ul class="dropdown">
-
<li><a href="about_new.htm" >About Us</a>
-
<ul class="dropdown">
-
<li><a href="corpgov_new.htm">Corporate Governance</a></li>
-
<li><a href="strategy_new.htm">Our Strategy</a></li>
-
<li><a href="strengths_new.htm">Our Strengths</a></li>
-
<li><a href="history_new.htm">Our History</a></li>
-
</ul>
-
</li>
-
<li><a href="caution_new.htm" class="dropdown">Investor Relations</a></li>
-
<li><a href="site_new.htm">Site Map</a></li>
-
<li><a href="info_new.htm">Contact Us</a>
-
<ul>
-
<li><a href="info_new.htm">Information Request</a></li>
-
<li><a href="add_new.htm">Add/Remove Me to E-mail List</a></li>
-
<li class="dropdown"><a href="career_new.htm">Career Opportunities</a></li>
-
</ul>
-
</li>
-
</ul>
Here is my CSS sheet - ul.dropdown {
-
background-color: #006699;
-
float: none;
-
list-style-image: none;
-
list-style-type: none;
-
position: relative;
-
z-index: 597;
-
width: 826px;
-
vertical-align: middle;
-
word-spacing: normal;
-
visibility: visible;
-
color: #000;
-
font-family: Arial, Helvetica, sans-serif;
-
white-space: nowrap;
-
letter-spacing: normal;
-
text-indent: 0%;
-
font-size: 12px;
-
font-weight: bold;
-
padding: 0px;
-
margin-top: -7px;
-
margin-right: 0px;
-
margin-bottom: 0px;
-
margin-left: -207.75px;
-
page-break-before: auto;
-
page-break-after: auto;
-
}
-
-
ul.dropdown a:link {
-
font-family: Arial, Helvetica, sans-serif;
-
color: #000;
-
text-decoration: none;
-
font-size: 12px;
-
font-style: normal;
-
text-align: left;
-
border-bottom-style: none;
-
border-top-style: none;
-
border-right-style: none;
-
border-left-style: none;
-
}
-
ul.dropdown li:hover {
-
background-color: #ace1f1;
-
position: relative;
-
z-index: 599;
-
color: #000;
-
font-family: Arial, Helvetica, sans-serif;
-
background-position: center;
-
}
-
ul.dropdown a:visited {
-
font-family: Arial, Helvetica, sans-serif;
-
color: #000;
-
text-decoration: none;
-
font-size: 12px;
-
font-style: normal;
-
text-align: left;
-
border-bottom-style: none;
-
}
-
-
-
ul.dropdown a:hover {
-
color: #FFF;
-
text-decoration: none;
-
display: block;
-
font-family: Arial, Helvetica, sans-serif;
-
background-color: #ace1f1;
-
visibility: visible;
-
}
-
ul.dropdown li {
-
line-height: 1.3em;
-
vertical-align: middle;
-
float: left;
-
padding-top: 7px;
-
padding-right: 69px;
-
padding-bottom: 7px;
-
padding-left: 69px;
-
border-right-width: 0px;
-
border-right-style: none;
-
border-right-color: #999999;
-
list-style-image: none;
-
list-style-type: none;
-
color: #FFF;
-
text-align: left;
-
margin: 0px;
-
font-size: 12px;
-
}
-
-
ul.dropdown ul {
-
background-color: #EEEDED;
-
margin: 0px;
-
width: 206.5px;
-
list-style-image: none;
-
list-style-type: none;
-
position: absolute;
-
visibility: hidden;
-
z-index: 598;
-
left: 0%;
-
top: 100%;
-
float: left;
-
text-align: left;
-
padding-top: 0px;
-
padding-right: 10px;
-
padding-bottom: 0px;
-
padding-left: 10px;
-
font-family: Arial, Helvetica, sans-serif;
-
font-size: 12px;
-
color: #000;
-
}
-
ul.dropdown.li {
-
line-height: 1.3em;
-
vertical-align: middle;
-
margin: 0px;
-
float: left;
-
padding-top: 7px;
-
padding-right: 20px;
-
padding-bottom: 7px;
-
padding-left: 10px;
-
border-right-width: 1px;
-
border-right-style: solid;
-
border-right-color: #999999;
-
list-style-image: none;
-
list-style-type: none;
-
border-top-style: none;
-
border-bottom-style: none;
-
border-left-style: none;
-
text-align: right;
-
width: 300px;
-
font-family: Arial, Helvetica, sans-serif;
-
position: relative;
-
font-size: 14px;
-
color: #FFF;
-
}
-
ul dropdown li:hover {
-
background-color: #ace1f1;
-
position: relative;
-
z-index: 599;
-
}
-
ul.dropdown li:hover > ul {
-
visibility: visible;
-
background-color: #eeeded;
-
}
-
ul.dropdown ul li {
-
float: none;
-
border-top-style: none;
-
border-right-style: none;
-
border-bottom-style: solid;
-
border-left-style: none;
-
text-align: left;
-
border-bottom-width: 1px;
-
border-bottom-color: #ace1f1;
-
padding-right: 30px;
-
padding-left: 5px;
-
background-color: #eeeded;
-
font-family: Arial, Helvetica, sans-serif;
-
font-size: 12px;
-
color: #FFF;
-
}
-
ul.dropdown {
-
background-color: #006699;
-
float: left;
-
list-style-image: none;
-
list-style-type: none;
-
position: relative;
-
z-index: 597;
-
color: #FFF;
-
overflow: visible;
-
left: 25%;
-
top: 0px;
-
right: 25%;
-
bottom: 0px;
-
font-size: 12px;
-
background-image: none;
-
}
0 1378 Sign in to post your reply or Sign up for a free account.
Similar topics |
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.
|
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>
|
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:
|
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...
|
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
| |
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;
|
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;
...
|
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.
|
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
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
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...
| |