Hello,
I just started using Drupal and Danland and have a question regarding menus.
I am trying to customize the color of my drop down menus via my local,css file and I was able to change everything except the color of a selected parent menu and the underlying chile menu. The parent menu always stays dark blue, while the underlying menu always stays light blue as in the unchanged Danland theme.
This is the part of the code which is not working:
#nav .menu li a.is-active {
background: <hex>;
}
#nav .menu li:first-child a.is-active {
background: <hex>;
}
#nav .menu li li:first-child a.is-active {
background: <hex>;
}
#nav .menu li li a.is-active {
background: <hex>;
}
If I change a.is-active
to a:active
, then the color changes only during the duration of the click, however it reverts to the original blue afterwards.
When I do this, I make sure to clear both the cache of Drupal and of my browser.
I read some information that the original color actually uses the images in /themes/images, namely menu-bg.png
and bg-bar.png
. I went ahead and changed those images, however nothing happens. If, however, I change the image body-bg.png
, then the background changes, so that does work. Upon examination I saw that body-bg.png
is referenced in the file style.css
but menu-bg.png
and bg-bar.png
are not, which might be the reason. In which file are menu-bg.png
and bg-bar.png
referenced?
If someone can help me out, I would really appreciate it because the current problem that I am facing makes the theme unusable due to color mismatch. Where is this dark blue and light blue colors for selected menu items hardcoded and how can I change it?
Also, why are there two .css files, namely style.css
and responsive.css
? What do they each do?
Comment | File | Size | Author |
---|---|---|---|
#3 | color-issue-resolved-28735013-3.patch | 1.59 KB | Gauravvvv |
Comments
Comment #2
jopeto CreditAttribution: jopeto commentedOK, after several hours of experimentint, I managed to get a local.css file, which has separate colors for the following entries:
- unselected top menu entries
- the selected top menu entry
- hovering over top menu entries
- the instance of clicking over the top menu entries
- the drop down menus
- hovering over the drop down menus
- the instance of clicking over the drop down menus
Here is the code, that can be pasted in the local.css file, since it might be useful for beginners.
The entire process is not entirely clear to me yet, so if someone can give a good reference for css, that would be appreciated.
Also, if someone knows where the image files for the menu are referenced (a per my previous post), that information would be appreciated.
Comment #3
Gauravvvv CreditAttribution: Gauravvvv commentedI have provided a patch please verify it if it is working or not.
Comment #4
Gauravvvv CreditAttribution: Gauravvvv commentedComment #5
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedComment #7
kunalkapoor CreditAttribution: kunalkapoor at OpenSense Labs commentedComment #8
kunalkapoor CreditAttribution: kunalkapoor at OpenSense Labs commented