Drop Down Menu showing below another <div> |
Drop Down Menu showing below another <div> |
ccs |
Jun 25 2013, 05:04 PM
Post
#1
|
Group: Members Posts: 4 Joined: 25-June 13 Member No.: 19,345 |
I think I messed something up in my style.css. The website that I produced shows a drop down menu that is showing below my main body tag. I believe it is css related because it's consistent across my entire site I'm building. It passes the css validator, but clearly I did something wrong. Any ideas would be appreciated. Thanks!
style.css ( 6.98k ) Number of downloads: 415 |
pandy |
Jun 25 2013, 05:34 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Please post the URL to the page.
|
ccs |
Jun 25 2013, 05:43 PM
Post
#3
|
Group: Members Posts: 4 Joined: 25-June 13 Member No.: 19,345 |
|
pandy |
Jun 25 2013, 08:16 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Ok, then post the HTML also. We need to see that too.
|
ccs |
Jun 25 2013, 10:24 PM
Post
#5
|
Group: Members Posts: 4 Joined: 25-June 13 Member No.: 19,345 |
Ok, then post the HTML also. We need to see that too. HTML added. index.html ( 3.52k ) Number of downloads: 432 |
pandy |
Jun 26 2013, 07:16 AM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
It's the positioning. Positioned boxes are automatically on top of non positioned and when all involved boxes are positioned the one that comes last in the source is on top - that's the one with the content in this case. You can change that with z-index. It's probably enough to give #sidebar any positive z-index, for instance...
CODE #sidebar { z-index: 100 } http://www.w3.org/TR/CSS2/visuren.html#propdef-z-index |
ccs |
Jun 26 2013, 12:03 PM
Post
#7
|
Group: Members Posts: 4 Joined: 25-June 13 Member No.: 19,345 |
It's the positioning. Positioned boxes are automatically on top of non positioned and when all involved boxes are positioned the one that comes last in the source is on top - that's the one with the content in this case. You can change that with z-index. It's probably enough to give #sidebar any positive z-index, for instance... CODE #sidebar { z-index: 100 } http://www.w3.org/TR/CSS2/visuren.html#propdef-z-index Perfect! That fixed it! Thanks so much! I was pulling my hair out on that one. |
pandy |
Jun 26 2013, 01:17 PM
Post
#8
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
You are welcome.
|
Lo-Fi Version | Time is now: 20th April 2024 - 11:37 AM |