I wanted to change the primary menu drop down background images so I simply added this to local.css:
#primary-menu ul.menu li {
background:transparent url(../images/newfile-tab-left.png) no-repeat scroll 0 0;
}
#primary-menu ul.menu li a:link, #primary-menu ul.menu li a:visited {
background:transparent url(../images/newfile-tab-right.png) no-repeat scroll 100% 0;
}
#primary-menu ul.menu li .nolink {
background: transparent url(../images/newfile-tab-right.png) no-repeat 100% 0;
}
But it only partially works. The static background image replaces fine, as well as the hover lef-tab image, but the right-tab hover image will not flip.
If I simply change the file names in fusion-acquia-marina-style.css it works ok. For some odd reason local.css won't override just for that image. Checked with several browsers.
Am I missing something?
Comments
Comment #1
jeremycaldwell commentedTry removing the "scroll" from your CSS code and see if that helps. I tried locally with background colors rather than images and it worked correctly so that is my guess. That or your images doesn't exist for the "newfile-tab-right.png" file.
Comment #2
druplicate commentedRemoving scroll did nothing.
The image file exists because it is correctly called by the 2nd CSS entry I added to local.css, i.e. the "visited" class.
It's only when I hover over the menu item that that same image doesn't get used.
In the very same statement in fusion-acquia-marina-style.css, just changing the file name to newfile-tab-right.png makes it work ok, so clearly there's some weird issue with local.css overriding. The CSS for the left-tab image replaces fine on hover, so why not the right one too?
Very strange.
Comment #3
druplicate commentedJust upgraded Acquia-Marina to Alpha-2 and this problem still exists.
Comment #4
roball commentedDoes it also still exist in beta1?
Comment #5
jeremycaldwell commentedPerhaps you need to be more specific with your CSS overrides then? If your local.css file is loading correctly (last) then it does work but the CSS needs to be updated to work correctly. I can get things working locally so it should work for you if the overrides are correct. Can you provide us with a link to your site so we can take a look?
Comment #6
druplicate commentedSame problem in beta1.
I'm no CSS guru, but I thought that if I used the exact same set of elements and selectors, the local.css would supersede it.
Yes, please have a look: www.bangkokcondoandhouse.com
The site is locked down during development to keep out crawlers so login with "guest", "LoS31756#".
Comment #7
druplicate commentedbump version to beta1
Comment #8
jeremycaldwell commentedI took a look at your site and it is loading the local.css file correctly. With Firebug I was also able to change the background color of the menu items (tabs) so that works as well. My guess is that your path to the image isn't correct as I couldn't find it on your server.
This is essentially where you image should be loading from and it doesn't exist: http://www.bangkokcondoandhouse.com/en/sites/all/themes/acquia_marina/im...
Double check to make sure that image exists on your server in the proper location and then call it from the CSS with the correct path.
Comment #9
druplicate commentedWell, after much sleuthing I solved this tricky problem.
The image has always been there and it was replacing via local.css fine for background but not for hover.
Turns out you can't just replace any statements containing the image file name (tab-right.png) alone.
You have to include the hover statements too because of the order in which CSS is applied. So I just copied the following from the original CSS and put it in local.css and the problem went away.
Not sure why this applied to the right image but not the left, however.
Minus a few hairs later... it works.
Comment #10
vitis commentedsub