Jason Weber
Jason Weber

Reputation: 5741

Major CSS issue; text should be white, not blue. CSS selector issue, or !important issue?

CSS issue. This is a WordPress site and the text in my menu items should be white. But for some odd reason, it's showing up as blue:

My top Menu

So I firebugged it, and I really don't know what to add as custom CSS with all the selectors #, ., etc.; I've always had trouble with this:

Mission is a menu item that I firegubbed, as seen below

Lastly, here's my CSS that's supposed to be used ..

#dc_jqmegamenu_widget-%ID%-item {font: normal 13px Arial, sans-serif; line-height: 16px;}
#dc_jqmegamenu_widget-%ID%-item ul, #dc_jqmegamenu_widget-%ID%-item ul, #dc_jqmegamenu_widget-%ID%-item ul li {margin: 0; padding: 0; border: none;}
#dc_jqmegamenu_widget-%ID%-item ul.menu {background: #222 url(skins/images/bg_black.png) repeat-x 0 -80px; width: 100%; height: 40px; border-right: 1px solid #1B1B1B; border-left: 1px solid #1B1B1B; position: relative;}
#dc_jqmegamenu_widget-%ID%-item ul li {float: left; margin: 0; padding: 0; font-size: 13px; font-weight: bold;}
#dc_jqmegamenu_widget-%ID%-item ul li a {float: left; display: block; color: #fff; padding: 12px 38px 12px 25px; background: url(skins/images/bg_black.png) repeat-x 100% 0; text-shadow: 1px 1px 1px #000; text-decoration: none;}
#dc_jqmegamenu_widget-%ID%-item ul li a.dc-mega {position: relative;}
#dc_jqmegamenu_widget-%ID%-item ul li a .dc-mega-icon {display: block; position: absolute; top: 18px; right: 15px; width: 8px; height: 6px; background: url(skins/images/arrow.png) no-repeat 0 0;}
#dc_jqmegamenu_widget-%ID%-item ul li.mega-hover a, #dc_jqmegamenu_widget-%ID%-item ul li a:hover {background-position: 100% -40px; color: #000; text-shadow: none;}
#dc_jqmegamenu_widget-%ID%-item ul li.mega-hover a .dc-mega-icon {background-position: 0 100%;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub-container {position: absolute; background: url(skins/images/bg_sub_left.png) no-repeat 0 100%; padding-left: 20px; margin-left: -3px;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub {background: url(skins/images/bg_sub.png) no-repeat 100% 100%; padding: 20px 20px 20px 10px;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub-container.mega .sub {padding: 20px 20px 10px 0;}
#dc_jqmegamenu_widget-%ID%-item ul.full-width li .sub-container.mega .sub {margin-right: -2px;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub .row {width: 100%; overflow: hidden; clear: both;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub li {list-style: none; float: none; width: 170px; font-size: 1em; font-weight: normal;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub li.mega-hdr {margin: 0 10px 10px 0; float: left;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub li.mega-hdr.last {margin-right: 0;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub a {background: none; border: none; text-shadow: none; color: #111; padding: 7px 10px; display: block; float: none; text-decoration: none; font-size: 0.9em;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub li.mega-hdr a.mega-hdr-a {padding: 5px 5px 5px 15px; margin-bottom: 5px; background: #6B6B6B url(skins/images/bg_mega_hdr.png) no-repeat 0 0; text-transform: uppercase; font-weight: bold; color: #fff; text-shadow: 1px 1px 1px #333;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub li.mega-hdr a.mega-hdr-a:hover {color: #000; text-shadow: none;}
#dc_jqmegamenu_widget-%ID%-item ul .sub li.mega-hdr li a {padding: 4px 5px 4px 20px; background: url(skins/images/arrow_off.png) no-repeat 5px 8px; font-weight: normal;}
#dc_jqmegamenu_widget-%ID%-item ul .sub li.mega-hdr li a:hover {color: #a32403; background: #efefef url(skins/images/arrow_on.png) no-repeat 5px 8px;}
#dc_jqmegamenu_widget-%ID%-item ul .sub ul li {padding-right: 0;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub-container.non-mega .sub {padding: 20px 20px 20px 0;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub-container.non-mega li {padding: 0; width: 190px; margin: 0;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub-container.non-mega li a {padding: 7px 5px 7px 22px; background: url(skins/images/arrow_off.png) no-repeat 7px 10px;}
#dc_jqmegamenu_widget-%ID%-item ul li .sub-container.non-mega li a:hover {color: #a32403; background: #efefef url(skins/images/arrow_on.png) no-repeat 7px 10px;}

As you can see, there's nothing blue in that CSS; I don't know where the blue is coming from. It should be white. Maybe I have to try putting !important after the #fff ... but that didn't seem to work either. You can see the menu in action here.

Any help with this conundrum would be greatly appreciated!

Upvotes: 1

Views: 377

Answers (5)

Keith
Keith

Reputation: 4147

These two classes have the blue color:

 .catalyst-widget-area a, .catalyst-widget-area a:visited {
   color: #3A639A !important;
   text-decoration: none !important;
 }

This is why your text is blue. So make a new style sheet or change it.

Upvotes: 3

scunliffe
scunliffe

Reputation: 63588

You can't match an ID selector in CSS with a wildcard (at least not the way you are trying)

you can do any of these:

#exactCaseSensitiveMatchOnTheID{...}

div[id*='substringInTheID']{...}

However realistically if you want to match on multiple, similar elements... add a class to them and select by class instead.

div.myClassName{...}

Upvotes: 1

Axel
Axel

Reputation: 10772

In Firebug, you can see that this style is being applied in dynamik-min.css on Line 2

.catalyst-widget-area a, .catalyst-widget-area a:visited {
    color: #3A639A !important;
    text-decoration: none !important;
}

Note the !important flag on the color attribute.

You can simply apply an !important to to #dc_jqmegamenu_widget-2-item ul li a like this:

#dc_jqmegamenu_widget-2-item ul li a {
    color: #FFFFFF !important;
}

Upvotes: 1

Abdul Malik
Abdul Malik

Reputation: 2642

Add this to your css

#dc_jqmegamenu_widget-2-item ul li a{color:#fff !important;}
#dc_jqmegamenu_widget-2-item ul li a:hover{#3A639A !important}

Upvotes: 1

showdev
showdev

Reputation: 29168

I see a blue style applied to links:

dynamik-min.css, line 2

.catalyst-widget-area a, .catalyst-widget-area a:visited {
  color: #3A639A !important;
  text-decoration: none !important;
}

Upvotes: 1

Related Questions