Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts

    Question Can you have multiple background images in a menu nav

    Hey guys, so i have a question / problem for you.
    Iv decided to make a site.
    And in the Menu, i have a divider for the background image of each LI.
    But what i also want is to have a hover background image.

    So when i hover over the item, such as home.
    At the top of the Home Menu, there is a glowy like thing.

    The glow im using is http://armstrongwebandgraphic.com/Aa...lover-glow.png

    You can find the website at http://armstrongwebandgraphic.com/Aarons-New-Site/

    So is there anyway to have multiple background images ?

    Any help would be greatly appreciated.

  • #2
    New Coder
    Join Date
    Feb 2011
    Posts
    39
    Thanks
    8
    Thanked 1 Time in 1 Post
    Yes, each LI must have its own class, like home etc.

    so it would be li class="home"

    (assuming the li's aren't already a specific class...)

  • Users who have thanked flynryan692 for this post:

    aaronhockey_09 (05-01-2011)

  • #3
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Okay, let me try that. Right now they are just all the same class

  • #4
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Hey, so im having some trouble with this.
    Anyway you could show me an example of the css and html to do this.

  • #5
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    Thanks, figured it out.

  • #6
    New Coder
    Join Date
    Apr 2011
    Location
    New Delhi, India
    Posts
    27
    Thanks
    0
    Thanked 2 Times in 2 Posts
    hey aaronhockey

    i don't know which way u found out but u can use one image, that has all images u want to use in ur nav bar, and add span tag inside every nav with link class and use that same image by changing background-position (better change classes for every link rather than using span for that)...

    dis technique is called css image sprites...

    hope dis help more...


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •