I apologize if this post makes little to no sense, I'm very, very new to CSS, additionally some of the terminology is new to me and I'm not entirely certain I'm using it correctly.
I'm helping to tweak a pre-existing website that was created for Wordpress. (www.teloscares.org). Here's the problem that I'm having (As a side note, I use (for example) which means that I'm currently on that page. What I'm attempting to do is describe my problem by way of explaining what pages I'm on, etc.):
The "nav-bar" is the Cyan colored strip up on top with 5 items, Home, Benefits, Get Involved, Donate and About Us. While on the home page (for example) you notice that "Home" is surrounded by a yellow box. If you hover over "Benefits" (for example) you see that there's a sub-menu, with the light/dark grey boxes. Now, when you CLICK on the Benefits page in order to Navigate to it, "Benefits" now becomes your active page and the Navigation bar now has a yellow box instead of grey.
The PROBLEM I'm having is that while the "Benefits" box is meant to be yellow, the sub-menu items also appear yellow, and I want them to retain their grey.
When I navigate to a sub-menu page, it displays correctly with ONLY the active page being yellow.
How do I make it so that when the active page is a MAIN page on the nav-bar, the sub-menu boxes do not also appear yellow?
If need be, I'm willing to post any/all of the style.css file. Thank you very much for your help with this matter. I've been trying to find a solution on google with little luck.
-Josh
Here is the code causing the problem, its line 1331 of your stylesheet.
/* Removing this ALSO seemed to remove the yellow Block.
Changing the color property changed the text WITHIN the yellow block, but not
the color of the yellow block itself. Hm..... -Josh */
.main-header .navigation ul li.current_page_item a {
color: #000; /* was 000 */
/* Taking out THIS line removes the yellow block, but from both the main and sub-pages. -Josh */
background: url('images/bg_header.png') repeat-x left top;
}
Change it to this and voila :)
.current-menu-item {
color: #000; /* was 000 */
background: url('images/bg_header.png') repeat-x left top;
}
Your selector before, ul li.current_page_item a selects ALL the links that are within the li.current_page_item. We just want the top, and WordpPress uses .current-menu-item class.
This is happening because you apply the background image to all 'a' inside the 'li'. You should apply this instead:
.main-header .navigation ul li.current_page_item > a { .. }
Related
I have problem with making colors in small fixed manu , when someone scroll down. In first main menu (white text, with black backgorund, social icons is ok), but in small fixed menu, when someone scroll down, social network is not shown, if used is not close with arrow on it. How to make social network icons to be showed in black color in white fixed menu? I tryed adding this CSS:
[class^="fa-"],
[class*=" fa-"] {
color:#000;
}
but this CSS makes social networks in main black menu black, and not visible. How to resolve this?
Thanks in advance. Site URL
When you scroll down, javascript is triggering a class 'mini' in your menu.
If you want to show black icons only when the 'mini' menu is active you could add to your css :
.mini [class^="fa-"],
.mini [class*=" fa-"] {
color:#000;
}
}
So classes that start with "fa-" ([class^="fa-"]) and classes that contain " fa-" ([class*=" fa-"]) would only be affected if one of their parent has a class 'mini'
The logo element on the website:
puerteaspecialists.co.uk
was originally at the front. I didnt even update anything and one day i check the site and now the top 3rd is hidden behind the nav bar.
Ive tried z - index and have kinda worked out why this isnt working, but also havnt actually found the solution.
Is there a way to bring this to the front or anyway to show the full image via css?
Thanks!
A simple solution is to remove the solid background of the uppermost navigation bar...
.top_nav_out {
background-color: transparent;
border: none;
}
The problem is that class name .top_nav_out in your top navigation block applies a high z-index which causes the top-most nav block to overlap the lower navigation block (.top_nav) which hides your logo partially.
remove property:
z-index
from class:
.top_nav_out
and your logo will be displayed in full.
From what I have seen, the z-index property is redundant anyway in that class (layout stayed in good shape after removing it)
Hope it helps a bit!
So we're using Cherry Frameworks (ugh) with Wordpress. The third-level navigation is getting cut off. I've tried manipulating the CSS to fix the issue to no avail. There's no option in the framework.
The problem resides in the Services menu. Resize your screen smaller to view the issue.
My solution is to push the third-level nav to the left side instead of the right side. Thoughts on how to do this?
http://dev.torontofamilytherapist.com/
So using chrome's inspect element, I was able to figure out what needed to be changed:
#topnav li .sub-menu .sub-menu {
left: 100%;
margin: -10px 0 0 2px;
}
changed to:
#topnav li .sub-menu .sub-menu {
left: -100%;
margin: -12px 0 0 2px;
width: 100%;
}
The result:
As you can see the items are appearing on the left, but you'll need to do some css tweaks to get them to look juuuust right.
Here's how you can troubleshoot CSS issues like this using chrome's developer tools:
Right click over the offending element, in this case: we are looking at "Services", then select "Inspect Element":
You should now be inspecting the current CSS like so:
Now since these items are appearing when you hover, you'll have to 'force' a hover state.
This is where the fun begins. You'll have to make sure you find the right elements to force the hover on. I actually had a little struggle with this, so I ended up adding the force hover state to many other elements until it finally appeared (the green menu)
Repeated the same process to get the third tier menu.
Now you right click on the actual menu and select "inspect element" again - this time since the menus are FORCED HOVER, the item will stay selected when move the mouse away and you can finally see the actual CSS.
It was actually harder than it needed to be, as the theme really has some counter-intuitive settings to show these menus (why not just on hover?? it really felt like on multiple items hover..)
I'm trying to edit the revolution slider plugin on my wordpress site. My images (slides) are not left aligned in the slider div. I found out where I can fix it using Firebug, and I know how to enter it into the custom css on wordpress, but but don't know the exact syntax to designate the proper div/id/class etc.
Video:
http://youtu.be/oyYrKAAAe80
Page in Question:
http://www.billyjacksdesign.com/design-work/the-living-logo/#htbanchor
I made the background of the slider red so the area I'm talking about is obvious, if you look at the other two sliders, you'll see that same area is white, but the div's shadow continues to the left margin--this misalignment is what I'm trying to remove.
Thanks for any help.
Adding the following to your stylesheet should work:
.rev_slider ul {
margin-left: 0;
}
Since the ul tag has a margin-left of 15px, but it doesn't have a class/id, you will need to go up a level which has a class rev_slider. Since the ul is in that class you can used .rev_slider ul
I have an issue using the slicknav responsive menu, if the navigation buttons have a different background colour set for the hover in the stylesheet, if you hover over the actual tag text the background colour changes correctly, but if you hover over any part of the button away from the text, then the colour behind the actual text doesn't change. So you get a rather ugly box around the text in the original colour. This is happening in all browsers tested.
I cannot find any way to stop this happening, the css file is not that complicated. I've used Slicknav now on a few sites and always had the same problem, but this time I really need to fix it.
You can see an example of this here: http://www.yorkluxuryholidays.co.uk/
In responsive mode, hover anywhere over one of the menu items that have sub menus, but not directly over the menu text itself, and the area behind the text does not change colour.
This is the css I'm using for the hover:
.slicknav_nav .slicknav_item:hover {
background:#59584e;
color:#fff; }
.slicknav_nav a:hover{
background:#59584e;
color:#fff;}
It seems to make no difference which class you set the colour on, either or both, the behaviour is exactly the same.
I'd love to know if there is a way to fix this with the css!
Add in your css :
.slicknav_nav a:hover * {
color:#fff;
background-color:#7b9fc7;
}