Hallo Mario, auf der linken Seite habe ich jetzt alles (siehe unten). Der Button "Menü" bleibt bei dir recht kurz, bei mir geht er jetzt aber über die ganze Seite beim öffnen. Ich mache dir mal ein Bild davon. Kannst du mir da helfen? Danke
CSS
<
style>
#content {
padding-bottom: 10px;
}
<
/style>
<
style>
.
sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 99000;
top: 0;
left: 0;
background-color: #333;
overflow-x: hidden;
transition: 0.
5s;
padding-top: 60px;
z-index: 6101;
}
.
sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.
3s;
}
.
sidenav a:
hover {
color: #f1f1f1;
}
.
sidenav .
closebtn {
position: absolute;
top: 0;
left: 0px;
font-size: 36px;
margin-left: 50px;
}
#main {
position: fixed;
z-index: 1;
top: 20px;
left: 0px;
padding: 5px 18px 5px 8px;
font-size:
14px;
color:
#000000;
background-color:
#D6CBB5;
border-radius: 5px 0 0 5px;
text-transform: uppercase;
cursor:
pointer;
transition: 0.
2s;
}
#main:
hover {
right: 0px;
}
@media (max-width: 20px) {
#main {writing-mode: vertical-rl; right: 7px; padding: 5px 18px 5px 4px;
}
#main:
hover { right: 12px;
}
}
@media screen and (max-height: 20px) {
.
sidenav {padding-top: 15px;
}
.
sidenav a {font-size: 18px;
}
}
<
/style>
Und dann Quelltext
<
div id="mySidenav" class="sidenav">
<
a href="javascript:
void(0)" class="closebtn" onclick="closeNav()">
×<
/a>
<
a href="index.
php">
Startseite<
/a>
<
a href="hover-effekte.
html">
Hover<
/a>
<
a href="text.
html">
Text<
/a>
<
a href="popup-fenster.
html">
CSS Fenster<
/a>
<
a href="menue.
html">
Menü<
/a>
<
a href="mehr.
html">
Mehr<
/a>
<
a href="layout.
html">
Layout<
/a>
<
a href="vorlagen.
html">
Vorlagen<
/a>
<
br>
<
a href="
http:
//codeschnipsel.
xobor.
de/" target="
blank">
Support<
/a>
<
a href="https:
//www.
facebook.
com/CodeschnipselZP/" target="blank">
Facebook<
/a>
<
/div>
<
div id="main" onclick="openNav()">
<
span>
☰ Menü<
/span>
<
/div>
<
script>
function openNav() {
document.
getElementById("mySidenav").
style.
width = "250px";
}
function closeNav() {
document.
getElementById("mySidenav").
style.
width = "10px";
}
<
/script>