kraftomatic
07-18-2005, 04:57 PM
Hey All,
Minor problem .. I have 2 style sheets being used on a page. One is the main style sheet with 95% of the page elements included. Another is one specifically for a dropdown menu. It looks like this:
ul {
margin: 0;
padding: 0;
list-style: none;
width: 140px;
/* this bottom border finishes off the main drop down (if using a border */
/*border-bottom: 1px solid #93591A;*/
}
nav {
/*
if you're looking for the "nav" id from the
ul tag, it's in the javascript, not the css
*/
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 139px; /* 1 px less width of ul */
width: 155px;
top: 0;
display: none;
border-bottom: 1px solid #93591A;
}
ul li a {
display: block;
text-decoration: none;
color: #000;
padding: 5px;
border: 1px solid #93591A;
border-bottom: 0;
background-color: #D6C49E;
}
ul li a:hover {
color: #93591A;
}
li:hover ul, li.over ul {
display: block;
}
a.noBorder {
border: 0px;
color: #000000;
background-color: transparent;
}
/* fix ie hack / hide from ie mac */
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
So I obviously have ul and li tags in the main stylesheet to handle normal instances not including the drop down menu.
What's the best way to differentiate these two? I'm trying to keep things clean, but I'm not sure the best way to go about doing this ..
Thanks!
Minor problem .. I have 2 style sheets being used on a page. One is the main style sheet with 95% of the page elements included. Another is one specifically for a dropdown menu. It looks like this:
ul {
margin: 0;
padding: 0;
list-style: none;
width: 140px;
/* this bottom border finishes off the main drop down (if using a border */
/*border-bottom: 1px solid #93591A;*/
}
nav {
/*
if you're looking for the "nav" id from the
ul tag, it's in the javascript, not the css
*/
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 139px; /* 1 px less width of ul */
width: 155px;
top: 0;
display: none;
border-bottom: 1px solid #93591A;
}
ul li a {
display: block;
text-decoration: none;
color: #000;
padding: 5px;
border: 1px solid #93591A;
border-bottom: 0;
background-color: #D6C49E;
}
ul li a:hover {
color: #93591A;
}
li:hover ul, li.over ul {
display: block;
}
a.noBorder {
border: 0px;
color: #000000;
background-color: transparent;
}
/* fix ie hack / hide from ie mac */
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
So I obviously have ul and li tags in the main stylesheet to handle normal instances not including the drop down menu.
What's the best way to differentiate these two? I'm trying to keep things clean, but I'm not sure the best way to go about doing this ..
Thanks!