Tuesday, May 18, 2010

Drop Down Menu: No More Hiding!!!

This post may contain affiliate or advertiser links. Read my full disclosure policy here.
I LOVE my new dropdown menu {thanks to Erica's wonderful tutorial}! However, what I didn't like was that the drop down portion of the menu would hide behind the "Showing Posts with..." label that Jolanthe refers to in her tutorial for removing it. Because the pesky little thing messed with my drop down menu, I was TOTALLY ready to remove it, but I realized that I kinda like having it around because it helps me when I surf other people's blogs. So, I set out on a mission to figure out how to have the best of both worlds...my wonderful new drop down menu that drops OVER the "Showing Posts with..." label.

Well, after lots of searching and researching, I discovered something called a "z-index." It is used to bring things to the forefront and background of your site. It basically helps with layering. Once I found out about it I started playing with it and I figured out how to fix my dilemma and the best part is that it is SUPER EASY!!!

Here is what you do: Click to edit the widget where you entered your html code for your dropdown menu. Find the following code:

#navbar li:hover ul {

display: block;

position: absolute;

background: #00cc00; {You may have a different color code here.}

margin: 0;

padding: 0; }

Once you have found this portion of the code, you will need to add one small part, which is below in red.

#navbar li:hover ul {

display: block;

position: absolute;

z-index:1000;

background: #00cc00; {You may have a different color code here.}

margin: 0;

padding: 0; }

Once you add the part in red, save and close the widget and you are all done. (You may be able to achieve the same results with a lower z-index, if needed.)

Now, that is what I am talking about...an easy fix for a "seemingly" big problem!  :-)

mama jenn


Like what you've read? Subscribe to have it delivered directly to your inbox!

Share


This post may contain affiliate links. Read my full disclosure policy here.

15 comments:

  1. Wow - that is cool. Now I have to see how to make the menu in the first place:)

    ReplyDelete
  2. Okay, the side column is way too cool!

    ReplyDelete
  3. my brain is now boggled, but like your set up. I did really LOVE the look of the brown background kind of like cork though.

    ReplyDelete
  4. Thanks! I think this is similar to my problem. My drop down disappears behind the post. I've tried messing with the z-index like you did but it's not fixing my problem. Did you come across anything like this in your research?

    ReplyDelete
  5. This totally fixed my problem. Thank you so much!

    ReplyDelete
  6. Amanda, Maybe try increasing the z-index #. Initially I tried 100 and it didn't work. Next I tried 1000 and that did the trick. Perhaps trying a larger #. Hope that helps!!! :-)

    ReplyDelete
  7. Thank you :) It helped me a lot.
    I was referenced from the bog Confessions of a Homeschooler, which helped me making the dropdowns.

    http://confessionsofahomeschooler.blogspot.com/2010/03/horizontal-drop-down-menunavigation-in.html

    ReplyDelete
  8. Thanks so much for this tutorial, I was ready to pull my hair out, I could not figure out why my drop down menu was hiding...Easy fix!

    ReplyDelete
  9. TOtally worked on my computer...but my husband went on his and the drop-down menu didn't work there. Thoughts?

    www.lil-LIZ-bits.com

    Working on the color scheme too...can't seem to decide. Hmmmm....

    ReplyDelete
  10. I am up to z10000 and still have a hiding drop down. HELP?!

    ReplyDelete
  11. OH thanks soooo much, you just solved my problem :)) i was so lucky to find your amazing blog from another great blog Confessions of a Homeschooler! i'll definitely keep on reading this :)
    -outi
    http://pienikuvakirja.blogspot.com/

    ReplyDelete
  12. Mrs T~

    Unfortunately I don't have another solution for you. I'm sorry!

    ReplyDelete
  13. Thanks! Now if only I could figure out how to get the widget box to look right on my blog. Any special hints??? :)

    ReplyDelete
  14. A Homemaker's Heart!
    Your blog is SO cute! As for the widget box, I totally just played around with mine. So, I probably would not be of much help. However, I think I am going to take it off. I don't like how it takes extra time to load on the page...

    ReplyDelete
  15. Thank you so much for sharing! I searched endlessly on many sites trying to figure out this problem. I can't believe it was that simple.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...