radecut — 2012-12-15T22:58:07-05:00 — #1
I recently made a drop down nav with nested lists and jQuery. But what I want the dropdown to do is to cover whatever other element is under it. Instead they jumble together which looks really messy. Is there is a easy way to fix this? Thanks.
ralphm — 2012-12-15T23:17:41-05:00 — #2
Hi Radecut. Welcome to the forums.
Yes, there's always a way to fix something like this. Can you post a link so we can see what's going on?
radecut — 2012-12-16T13:36:49-05:00 — #3
Thanks for the welcome! Heres a link to my problem:
ralphm — 2012-12-16T16:05:28-05:00 — #4
Hm, that dropdown is incomplete, as you can't hover over the sub links, so my advice would be to dump that version. It seems there's some transparency on the background of the sub list, but I can't for the life of me see where it's set. Weird. Anyhow, I'd suggest trying a better dropdown. Here's a simple one:
If you want something fancier but more reliable, try this:
radecut — 2012-12-17T19:10:44-05:00 — #5
ralphm — 2012-12-17T20:33:32-05:00 — #6
Can you post a link to what you have so far? Otherwise, all we can do is suggest you look at how the Suckerfish menu works on their site. If you look at the source code and explore the CSS, you'll see how it works.
radecut — 2012-12-19T21:39:46-05:00 — #7
Oh wow again, the new menu still has the problem of hiding behind other elements, here's the link, is there an easy way to fix this?
ralphm — 2012-12-20T07:57:12-05:00 — #8
Aye, 'tis very easy. Just add sommat like this:
<font color='"#FF0000"'>z-index: 100;</font>
radecut — 2012-12-20T15:21:28-05:00 — #9
Thank you so much! I really appreciate it. I never though it would be that easy. Thanks! Just for future reference, what does z-index do?
ralphm — 2012-12-20T21:58:42-05:00 — #10
Elements on a page basically layer on top of each other if there is any overlap, the elements later on the page having a higher stacking order. Your dropdown was "above" the following content in the code, so appeared behind it.
You can change the stacking order with the use of z-index. However, to change the z-index of an element, it must have a position: setting (like position: relative etc.) The z-index: 100 was just a random number. The main content probably has a z-index of 1 or something like that—I can't remember. You could experiment with how low the z-index can go before it falls behind again, but usually one just sets a high z-index and that's it. You could set it to a million, if you wanted.
billo — 2012-12-27T07:29:33-05:00 — #11
Where's your DTD?
This seems akward: PMS can ensure the customers to get high quality products and first-rate support in the following areas:
Don't you want to say, "ensure that customers get high quality products..." Perhaps say "our clients recieve" instead of "customers get." Just a suggestion.
paulob — 2012-12-30T15:24:50-05:00 — #12
You are linking to the same stylesheet 3 times?
[B]<link href="style1.css" rel="stylesheet" type="text/css">[/B]
Remove the link element from your library items as they cannot go in the body of the html anyway as it is invalid and pointless to make browsers download the same file 3 times.
The big images on the right should be inside a floated column (float:right) and not moved with relative position as currently they are sitting on top of your text content. You will very rarely move elements using relative position as it does not actually move anything physically but only visually; the space the relative element leaves behind is always preserved as though the element had never moved.,