Supportnet Computer
Planet of Tech

Supportnet / Forum / Skripte(PHP,ASP,Perl...)

Wie bekomme ich mein Dropdownmenü wieder in den Vordergrund?





Frage

Hey! Ich hoffe ihr könnts mir helfen, ich habe eine Seite mit hifle von css gestaltet. Alles schön und gut, nur leider ist jetzt mein dropdownmenü im hintergrund .. könnt ihr mir helfen?.. hier mein code: /* css Zen Garden default style v1.02 */ /* css released under Creative Commons License - http://creativecommons.org/licenses/by-nc-sa/1.0/ */ /* This file based on 'Tranquille' by Dave Shea */ /* You may use this file as a foundation for any new work, but you may find it easier to start from scratch. */ /* Not all elements are defined in this file, so you'll most likely want to refer to the xhtml as well. */ /* Your images should be linked as if the CSS file sits in the same folder as the images. ie. no paths. */ /* basic elements */ html { margin: 0; padding: 0; } #kopf { position: absolute; hight:150; text-align: center; } #dropdown-menu { top: 150; align: left; position: absolute; z-index:1; } #Body { top:180; position: absolute; width: 800px; height: 90%; left: 155px; bottom: 0px; margin: 0px; background-color: white; padding: 10px; background-image:url('logo.jpg'); background-repeat: no-repeat; background-attachment: scroll; background-position: 50% 50%; z-index:2; } #logo { position: absolute; top:75% left:5; margin: 0px; } ich glaub es geht ohne html code?!?.. Lg und danke

Antwort 1 von DaPascha

Hi,

der z-index entscheidet darüber was im Vorder- und was im Hintergrund ist. Ein Element mit einem höheren z-index wird dabei im Vordergrund dargestellt.

MfG DaPascha

Antwort 2 von katy

Hallo,

Zitat:
ich glaub es geht ohne html code?!?..
nicht wirklich, denn obwohl du mit der position:absolute-Kanone rumballerst gibst du nicht alle Positionen wirklich vor, so dass einiges nur aus der Elmentreihenfolge im HTML geschlossen werden kann. Zudem mixt du Pixel- und Prozent-Werte. Das passt so nicht zusammen und gibt sicherlich noch mehr Ärger.
Aber vielleicht hilft dir ja schon mal der Tipp mit dem z-index (body soll - soweit Überschneidungen vorliegen - vor dem Element mit der ID dropdown-menu liegen).

katy

Ich möchte kostenlos eine Frage an die Mitglieder stellen:


Ähnliche Themen:


Suche in allen vorhandenen Beiträgen: