• 0

CSS - Border on a drop down menu


Question

Hello all,

Ive got the following CSS drop down menu here which is working fine.

However, im trying to achieve something like eBay where, if you hover over the menu on the top right an border appears around the menu item, and the drop down.

I thought this would be simple enough - put a solid black border around the drop down, and then a black border around the left, top and right of the menu item and set the bottom border to be white - to "cover up" the border-top of the drop down. However, despite the z-index, the drop down always appears ontop of the menu item and i cant achieve the effect im looking for.

Would appreciate some help

Thanks

Link to comment
https://www.neowin.net/forum/topic/926142-css-border-on-a-drop-down-menu/
Share on other sites

8 answers to this question

Recommended Posts

  • 0
  On 02/08/2010 at 17:49, Cupcakes said:

For example:

 ul.products {
left 87px;
border: 1px solid #000;
margin-top: -1px;
}

You will also need to change add z-index (on the nested UL and the parent UL) so it appears behind it's parent list item.

Thanks for the reply.

Thanks what i was kind of doing though. Have a look again (ignoring the annoying inheritance)

With regards to the z-index - im confused! ul.menu li:hover has a z-index of 599 (highest value), yet it still appears below ul.menu ul (with a z-index of 598)?!

Thanks for the help

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Well that's the weird thing, the UK really isn't a very religious country at all and the same politicians that are backing this (basically all of them) also support things like assisted dying which various religions spoke out against. I don't think this is coming from religion, of course religious groups will support it but I don't think they've started it.
    • No.  The only thing you'll be able to capture with that is via antenna (your local NBC, CBS, etc) or if you had a regular cable box you could capture ClearQAM channels (if they are still a thing...probably not though).  Everything else will have encryption which those capture cards aren't meant for.   So yeah...you'll need Verizon's DVR (sucks if you have to pay for it).
    • I've gotta say Microsoft has lost the plot a long, long, long time ago.
    • How is it be technically implemented, I mean if you wanted to include this let's say on this website, at what point do you interrupt the user flow and say yo! Show me your ID or get the hell out? Please go into extreme technical detail. Is it using a third-party, how much information does neowin receive from that third-party, at what point would that information be abused? We all know it would be abused. So hypothetically what would neowin receive from that third-party company?
    • It ***ABSOLUTELY WILL*** be abused further.
  • Recent Achievements

    • One Month Later
      Falcon.ai earned a badge
      One Month Later
    • Week One Done
      Falcon.ai earned a badge
      Week One Done
    • Dedicated
      EYEREX earned a badge
      Dedicated
    • First Post
      Electronic Person earned a badge
      First Post
    • Week One Done
      CyberCeps666 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      628
    2. 2
      ATLien_0
      235
    3. 3
      Xenon
      164
    4. 4
      neufuse
      142
    5. 5
      +FloatingFatMan
      123
  • Tell a friend

    Love Neowin? Tell a friend!