I can't get the color of my dropdown items white, someone knows how I can fix this?
My normal links needs to be black, the not active ones needs to be black, the active one needs to be white, the dropdown items needs to be white. I've got it all with that code except for the most up dropdown item.
Heres my css:
.menuitems{
line-height: 240%;
text-transform: uppercase;
}
.menuitems ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
}
.menuitems ul li {
display: block;
position: relative;
float: left;
}
.menuitems li ul {
display: none;
}
.menuitems ul li a {
height: 40px;
display: block;
text-decoration: none;
color: black;
border-left: 1px #D0D0D0 solid;
padding: 0px 30px 0px 30px;
}
.menuitems li > ul li a
{
color:white;
}
.menuitems ul ul li{
text-transform: none;
border-bottom: 1px #ff5c38 solid;
line-height: 380%;
}
.menuitems ul li:hover{
background: url('images/menu-background1.png') repeat-x 0 0;
}
.menuitems ul li a:hover {
height:40px;
color: white;
padding-left: 30px !important;
padding-right: 30px !important;
}
.menuitems li:hover ul {
display: block;
position: absolute;
}
.menuitems li:hover li {
float: none;
font-size: 13px;
background: #fa3423;
}
.menuitems li:hover a { }
.menuitems li:hover li a:hover {
}
/* What to do on active */
.menuitems ul li.current_page_item {
background: url('images/menu-background1.png') repeat-x 0 0;
}
.menuitems ul li.current_page_item a{
color: white;
}
.menuitems li.current_page_parent a {
color: white;
}
.menuitems li.current_page_parent {
color: white;
background: url('images/menu-background1.png') repeat-x 0 0;
}
.menuitems li:hover ul:hover a:hover{
color: white !important;
}
.menuitems ul li ul{
color: white;
}
I tried everything.. :(
Castra, I assume you're talking about the text? If you want the text to always be white, you'll need to change color: black; in .menuitems ul li a to color: white;
Here's a JSFiddle that shows it.
Related
I'm using this accordion menu module in joomla 2.5 http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems/accordion-menus/21961 , and the problem is that the submenu items have a bigger font than the menus in the starting level. I found in the template .css file where I can edit the size of the starting level menus, but not for the submenus. Here's a screenshot how it looks http://img7.imageshack.us/img7/1180/tikx.png
And here is the css code of this module:
.accordion-menu a{
text-decoration: none;
background: none;
font-family: Arial;
}
.accordion-menu a:hover,
.accordion-menu a:visited,
.accordion-menu a:active,
.accordion-menu a:focus{
background: none;
}
.accordion-menu a img {
vertical-align:middle;
border: 0 none;
height: auto;
max-width: 100%;
padding:0 5px 0 0;
}
.accordion-menu li{
cursor: pointer;
background:none !important;
}
.accordion-menu .opened{
border-bottom:none!important;
}
.accordion-menu li:last-child, .accordion-menu > li.last {
border-bottom: 1px solid #1a1a1a!important;
margin-bottom:-1px;
}
.accordion-menu > li > .item-wrapper{
height: 35px;
display:inline-block;
width:100%;
}
.accordion-menu > li > .item-wrapper a{
line-height: 35px;
font-size: 12px;
font-weight: bold;
}
.accordion-menu li .item-wrapper .menu-button{
width: 16px;
height: 16px;
margin: 9px 5px 0px 5px;
overflow: hidden;
}
.accordion-menu li .item-wrapper .menu-link{
width:81%;
}
.accordion-menu li .ul-wrapper{
display: none;
}
.accordion-menu li ul li .item-wrapper{
/* height: 30px; */
display:inline-block;
width:97%;
}
.accordion-menu li ul li .item-wrapper a{
line-height:35px;}
ul.accordion-menu li ul {
margin:0px;
padding:0px;
margin-bottom:-1px;
}
ul.accordion-menu li ul li .item-wrapper{
margin:0px;
padding-left:12px!important;
}
ul.accordion-menu li ul li li{
margin:0px;
padding-left:0px!important;
}
The line you want to change is this:
.accordion-menu li ul li .item-wrapper a {
line-height:35px;
font-size: 12px; /* Add this in */
}
Hope this helps
I have a main menu that i have styled with an underline appearing on the hover state.
However I don't want this to appear on the submenu categories.
This is my code:
#menu_container { padding: 0px 0; text-align: center; }
#menu_container a:hover{background: url("/main/nav.gif") repeat-x scroll 0px 20px transparent;}
#menu_container ul { list-style-type: none; margin: 0; padding: 0; text-align: center; }
#menu_container ul li { margin-left: 15px; font-family: 'Lato', sans-serif; font-weight: 900; font-size: 1.2em; color: #000; position: relative; padding-bottom: 10px; text-transform: uppercase; display: inline-block; letter-spacing:1px; }
#menu_container ul li:first-child { margin-left: 0; }
#menu_container ul li a { color: #000; text-decoration: none; display:inline-block; padding-bottom: 5px; padding:10px; border-radius: 0px;}
#menu_container ul li a:hover { color: #000; -webkit-transition: background 0.5sease;-moz-transition: background 0.5sease;-ms-transition: background 0.5sease;-o-transition: background 0.5sease;transition: background 0.5sease;}
#menu_container ul li.current-menu-item a,
#menu_container ul li.current_page_item a { color: #b9b9b9;}
#menu_container ul li ul { position: absolute; top: 35px; left: 0; padding: 1px 1px; z-index: 25; display: none; border-radius: 3px; text-align: left; }
I think you're asking for this:
#menu_container ul li a { text-decoration: none; ...}
#menu_container ul li a:hover { text-decoration: underline; ... }
#menu_container ul li li a:hover { text-decoration: none; ... } /* no hover underline on sublinks */
The underlying idea is selector specificity. A specific contextual selector (#menu_container ul li li a) overwrites a more generic definition (#menu_container ul li a).
See CSS priority scheme:
http://en.wikipedia.org/wiki/Cascading_Style_Sheets#CSS_Priority_scheme_.28highest_to_lowest.29
I did the job by make the submenu functioning, the problem is I can't get the submenu width wider than its parent.
when i hover, its messed up as you can see in fiddle links i provided below
please take a look at this http://jsfiddle.net/wR5L5/
.navigation {
height: 35px;
background: #333;
}
.navigation ul {
margin: 0;
padding: 0;
}
.navigation ul li {
position: relative;
display: inline;
}
.navigation ul li a {
text-transform: uppercase;
color: #fff;
font-weight: 700;
line-height: 35px;
padding: 6px 8px;
text-shadow: 0px 0px 1px #ff170f;
}
.navigation ul li a:hover {
text-decoration: none;
color: #FF3E36;
border-bottom: 2px solid #FF3E36;
}
.navigation ul li:hover ul {
left: 0;
}
.navigation ul .sub {
position: absolute;
z-index: 9999;
left: -9999px;
font-size: 13px;
}
.navigation ul .sub li {
padding-top: -4px;
float: none;
background: #fff;
}
.navigation ul .sub li a {
text-shadow: none;
color: #333;
}
.navigation ul .sub li a:hover {
color: #ff3e36;
border-bottom: none;
text-shadow: none;
}
.navigation ul .sub li:hover {
background: #333;
}
there is a flexible menu .sub class http://jsfiddle.net/wR5L5/12/
.navigation {
height: 35px;
background: #333;
}
.navigation ul {
margin: 0;
position: relative;
padding: 0;
}
.navigation ul li {
display: inline;
position: relative;
}
.navigation ul li a {
text-transform: uppercase;
color: #fff;
font-weight: 700;
line-height: 35px;
padding: 6px 8px;
text-shadow: 0px 0px 1px #ff170f;
}
.navigation ul li a:hover {
text-decoration: none;
color: #FF3E36;
border-bottom: 2px solid #FF3E36;
}
.navigation ul li:hover ul {
left: 0;
}
.navigation ul .sub {
position: absolute;
z-index: 9999;
left: -9999px;
float: left;
width: auto;
min-width: 100%;
background: #999;
font-size: 13px;
}
.navigation ul .sub li {
padding-top: -4px;
float: none;
white-space: nowrap;
clear: both;
background: #fff;
}
.navigation ul .sub li a {
text-shadow: none;
color: #333;
display: block;
float: none;
width: 100%;
}
.navigation ul .sub li a:hover {
color: #ff3e36;
border-bottom: none;
text-shadow: none;
}
.navigation ul .sub li:hover {
background: #333;
}
Give width to the sub menu to get submenu wider than main menu.
.navigation ul .sub {
position: absolute;
z-index: 9999;
left: -9999px;
width: 150px;
font-size: 13px;
}
I have got a task to do horizontal menu. While creating the menu i got a problem with the style.When we are hovering the menu it is jumping and also the sub child menu is comes at different position depending on the size of the text. My css file is
#wrapper {
width:100%;
height:500px;
}
h2 {
color:#787878;
}
#menu, #menu ul {
list-style: none;
//padding: 2px;
}
#nav{
border-bottom: 1px solid #CCCCCC;
border-spacing: 0;
display: table;
float: left;
height: 25px;
width: 100%;
}
#nav ul {
margin: 0;
padding: 0;
}
#nav > ul > li:hover {
background: none repeat scroll 0 0 #FFFFFF;
border-color: #ccc #ccc #FFFFFF;
border-style: solid;
border-width: 1px;
padding-bottom: 0;
border-radius:1px;
}
.menu-child {
width:160px;
display:block !important;
}
#nav ul li ul li:hover {
}
#nav ul li ul :hover {
}
#menu {
float: left;
height: 25px;
}
#menu> li {
float: left;
}
#menu li a {
display: block;
height: 2em;
line-height: 2em;
padding: 0 1.5em;
text-decoration: none;
}
#menu ul {
position: absolute;
display: none;
z-index: 999;
}
#menu ul li a {
}
#menu li:hover ul {
display: block;
}
#menu {
font-family: Arial;
font-size: 12px;
//background: #F8F8F8;
}
#menu > li > a {
font-family: Verdana, Arial, sans-serif;
font-style: normal;
color:#787878;
font-weight: bold;
}
#menu > li > a:hover {
color: #000;
}
#menu ul {
background: none repeat scroll 0 0 #FFFFFF;
border-radius: 0 0 5px 5px;
margin-top: 1px;
}
#menu ul li a {
color: #000;
}
#menu ul li a:hover {
background: #E0E0E0;
}
.logout {
float:right;
width:300px;
}
.title {
float:left;
width:300px;
}
#footer {
width:100%;
height:100px;
float:left;
}
.subchild-list {
margin:0;
position: absolute !important;
top:0;
right:-87px;
//border-color: #ccc #FFFFFF #ccc #FFFFFF;
}
.child-list ul {
display: none !important;
position: absolute !important;
z-index: 999 !important;
}
.child-list li {
position:relative !important;
}
.child-list li:hover ul {
display: block !important;
}
.child-list li{
border-left:1px solid #C0C0C0;
border-right:1px solid #C0C0C0;
}
.child-list ul{
border-top:1px solid #C0C0C0;
border-bottom:5px solid #C0C0C0;
}
.child-list{
border-bottom:5px solid #C0C0C0;
}
.nav-subchild
{
border-color: #ccc #FFFFFF #ccc #FFFFFF;
}
You can see my code from http://jsfiddle.net/ucpcA/1/ How can i solve this problem?
Add to css this:
li {border: 1px solid #fff;}
I tried it in fiddle and it solved "jumping"
//Edit
The main idea is to set border to the top li elements so when you add additional border with color it will not jump
//Edit 2 to solve your 2nd problem
To sovle your 2nd prbolem put this line
.subchild-list {
margin:0;
right:-150px;
position: absolute !important;
top:0; }
#menu ul li {width: 150px;}
It is just an example so you will see what it does. Put there the ewidth which you really need.
I have some pretty good experince coding my own UL's but I'm relatively new to wordpress. Confusing to me to work backwards especially when I can't see the html. Anyway I'm using the cufon WP plugin to change the font in the menu. but....with the size I want the font, it shrinks the list item as well as the a:hover. There is somehting in the padding i presume, but I can't find it. you can see what I mean here http://www.thedailyminx.com
here is the menu's css
#navbar {
float: left;
display: block;
background: #bfbcc6;
color: #000000;
width: 978px;
height: 30px;
font-size: 25px;
font-family: 'jc-hand';
margin: 15px auto 15px;
padding: 0px 0px 0px 0px;
border: 1px solid #DDDDDD;
position: relative;
z-index: 9;
}
/*** ESSENTIAL STYLES ***/
.menu, .menu * {
margin: 0;
padding: 0;
list-style: none;
}
.menu {
line-height: 1.0;
}
.menu ul {
margin: 0px;
padding: 0px;
}
.menu ul ul, ul.menu ul {
position: absolute;
top: -9999px;
width: 160px; /* left offset of submenus need to match (see below) */
}
.menu ul li ul li, ul.menu ul li {
width: 100%;
margin: 0px 0px 0px 0px;
}
.menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.menu li {
float: left;
display: inline-block;
position: relative;
}
.menu a {
display: inline-block;
position: relative;
}
.menu li:hover ul,
.menu li.sfHover ul {
left: 0;
top: 30px; /* match top ul list item height */
z-index: 99;
}
ul.menu li:hover li ul,
ul.menu li.sfHover li ul {
top: -9999px;
}
ul.menu li li:hover ul,
ul.menu li li.sfHover ul {
left: 160px; /* match ul width */
top: 0;
}
ul.menu li li:hover li ul,
ul.menu li li.sfHover li ul {
top: -9999px;
}
ul.menu li li li:hover ul,
ul.menu li li li.sfHover ul {
left: 160px; /* match ul width */
top: 0;
}
/*** SKIN ***/
.menu .current_page_item a,
.menu .current_page_ancestor a,
.menu .current-menu-item a,
.menu .current-cat a {
background: #333333;
color: #FFFFFF;
border-left: 1px solid #333333;
border-right: 1px solid #333333;
}
.menu li .current_page_item a, .menu li .current_page_item a:hover,
.menu li .current-menu-item a, .menu li .current-menu-item a:hover,
.menu li .current-cat a, .menu li .current-cat a:hover {
background: #333333 !important;
color: #FFFFFF !important;
border-left: none;
border-right: none;
}
.menu {
float: left;
margin-bottom: 0;
}
.menu a {
color: #000000;
background: none;
margin: 0px 0px 0px 0px;
padding: 0px 12px 0px 12px;
text-decoration: none;
letter-spacing: 0.1px;
line-height: 30px;
border-right: 1px solid #DDDDDD;
border-left: 1px solid #FFFFFF;
}
.menu li li a {
display: block;
background: #F5F5F5 !important;
color: #000000 !important;
margin: 0px 0px 0px 0px;
padding: 0px 10px 0px 10px;
font-size: 25px;
line-height: 30px;
text-decoration: none;
text-transform: none;
text-shadow: none;
letter-spacing: 0px;
border-right: none !important;
border-left: none !important;
}
.menu li, .menu li li, .menu li li li {
background: none;
margin: 0px;
padding: 0px;
}
.menu li:hover, .menu li.sfHover {
margin: 0px;
padding: 0px;
}
.menu a:focus, .menu a:hover, .menu a:active {
background: #333333;
color: #FFFFFF;
border-right: 1px solid #333333;
border-left: 1px solid #333333;
outline: 0;
}
.menu li li:hover, .menu li li.sfHover {
margin: 0px;
padding: 0px;
}
.menu li li a:focus, .menu li li a:hover, .menu li li a:active {
background: #EEEEEE !important;
color: #333333 !important;
border: none;
outline: 0;
}
can anyone help me out?
Thanks
Greg
ditch the inline height styling of cufon and set it in your stylesheet to 30px