Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me

TOPIC: Menu-Specific Background

Menu-Specific Background 9 months 2 weeks ago #52797

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
I'm trying to make the "hover" background in my whole site be a certain color. So I added the a:hover css style which is working fine. However, I want the MENU items (top menu) to still use the background image they were using when hovered over but instead they're now using the background color I've assigned to all the a:hover tags.

I've put an !important by the background-image but it is still being overridden by that background color for some reason! What am I missing? Here's the code I used:


#menu ul li:hover {
background-image: url(../images/Green/menubar_over.png)!important;
}

Site is at:

killearnlakesrealty.com/

Thanks!
Please become a member of OSTraining to reply to this post.

Menu-Specific Background 9 months 2 weeks ago #52922

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
Hi Jacki,

What Joomla version are you using?
#menu ul li:hover {
Green/menubar_over.png') !important;
}

Your !important needs a space before it (i.e. right after the closing parenthesis).

If that doesn't solve it for you, could you upload some annotated screenshots of the issue? Fireshot for Firefox is a great tool for annotated screenshots. Here's our tutorial on it:
www.ostraining.com/blog/webdesign/fireshot-firefox/

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Menu-Specific Background 9 months 2 weeks ago #52941

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
I'm using Joomla 2.5.5. Adding the space didn't change anything. I tried installing the fireshot add-on but it says it's not available for my platform (I'm on a Mac).

So I'll do it the old-fashioned way :)

I'm wanting the dark brown background-image to display whenever any of the top menu items are hovered over - it shows up now only when I hover over a sub-menu. Otherwise, the tan color (which I've set in general for any link tags) is showing up whenever those items are hovered over - that is overriding the menu item css styling no matter what I do!



Please become a member of OSTraining to reply to this post.

Menu-Specific Background 9 months 2 weeks ago #52962

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
Hi Jacki,

Try the following instead:
#menu ul li a:hover {
    background-image: url("../images/Green/menubar_over.png") !important;
}

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Menu-Specific Background 9 months 2 weeks ago #52967

  • jackibar
  • jackibar's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 509
  • Karma: 0
THANKS, Nick! That fixed it!
Please become a member of OSTraining to reply to this post.

Menu-Specific Background 9 months 2 weeks ago #52996

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
You're welcome, Jacki! I'm glad to be of help! :)

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sign Up for OSTraining

Powered by Kunena Forum

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.