Habe die zweite Methode verwendet. Habe davor auch schon Grids benutzt, war also vertraut damit.
Beiträge von Supernova
-
-
Vielen Dank! Hat alles geklappt.
-
Ich habe eine Seite, auf der es mehrere Grid-Boxen nebeneinander gibt. Nun habe ich in jede dieser Boxen einen Knopf eingefügt. Wie bekomme ich es hin, dass der Knopf in allen Boxen auf der gleichen Höhe sitzen. Ich habe es mal ein bisschen gezeichnet. Die kleinen Kästchen sollen die Knöpfe symbolisieren. Kann man die Knöpfe irgendwie unten anheften, ohne sie aus der Box zu schieben?
-
-
Nein, beim Hovern von z.B .nav-content soll sich z.B. .nav-item ändern. Mehr nicht das Dropdown-Menü funktioniert ansonsten super.
-
Ich habe einen Code geschrieben und es passiert leider absolut nichts. Der Code geht um einen Upload.
PHP
Alles anzeigen<style> .noperm{ font-family: sans-serif; color: red; margin-top: 23%; } h3{ font-family: sans-serif; } p{ font-family: sans-serif; } </style> <link rel="stylesheet" href="styles/bootstrap.css"> <?php error_reporting(E_ERROR | E_WARNING | E_PARSE); include('upload.php'); include('phpSkripte/login.php'); $conn = mysqli_connect("localhost", "root", "", "einloggen"); $user_check = $_SESSION['login_user']; $ergebnis = mysqli_query($conn, "SELECT rechte FROM login WHERE username = '$user_check'"); $row = mysqli_fetch_assoc($ergebnis); $login_session = $row['username']; if ($row['rechte'] >= 1) { ?> <form method="POST" enctype="multipart/form-data"> <center><div class="file"><input type="file" name="file" id="file"> </div> <br> <select class="form-control" id="path" name="path"> <option>qb1/1</option> <option>qb1/2</option> <option>qb1/3</option> <option>qb1/4</option> <option>qb1/5</option> <option>qb1/6</option> <option>qb2/1</option> <option>qb2/2</option> <option>qb2/3</option> <option>qb3/1</option> <option>qb3/2</option> <option>qb3/3</option> <option>qb4</option> </select> </center> <br> <center><div class="submit"><input type="submit" value="Hochladen" id="button"></div></center> <br> <br> </form> <?php echo $_POST["path"]; }else { ?><center><h1 class="noperm">ZUGRIFF VERWEIGERT!</h1><center><?php } ?> <?php if(isset($_POST["submit"])){ $error = $_FILES['userfile']['error']; $file = $_FILES["file"]; $path = $_POST['path']; echo $path; switch ($path) { case 'qb1/1': move_uploaded_file($file["tmp_name"], "uploads/qb1/1/" . $file["name"]); break; case 'qb1/2': move_uploaded_file($file["tmp_name"], "uploads/qb1/2/" . $file["name"]); break; case 'qb1/3': move_uploaded_file($file["tmp_name"], "uploads/qb1/3/" . $file["name"]); break; case 'qb1/4': move_uploaded_file($file["tmp_name"], "uploads/qb1/4/" . $file["name"]); break; case 'qb1/5': move_uploaded_file($file["tmp_name"], "uploads/qb1/5/" . $file["name"]); break; case 'qb1/6': move_uploaded_file($file["tmp_name"], "uploads/qb1/6/" . $file["name"]); break; case 'qb2/1': move_uploaded_file($file["tmp_name"], "uploads/qb2/1/" . $file["name"]); break; case 'qb2/2': move_uploaded_file($file["tmp_name"], "uploads/qb2/2/" . $file["name"]); break; case 'qb2/3': move_uploaded_file($file["tmp_name"], "uploads/qb2/3/" . $file["name"]); break; case 'qb3/1': move_uploaded_file($file["tmp_name"], "uploads/qb3/1/" . $file["name"]); break; case 'qb3/2': move_uploaded_file($file["tmp_name"], "uploads/qb3/2/" . $file["name"]); break; case 'qb3/3': move_uploaded_file($file["tmp_name"], "uploads/qb3/3/" . $file["name"]); break; case 'qb4': move_uploaded_file($file["tmp_name"], "uploads/qb4/" . $file["name"]); break; } header("location: uploadroot.php"); echo $error; } ?>
-
Code
Alles anzeigen<header> <div class="nav-main"> <div class="logo">Blab</div> <ul> <li> <a href="portfolio" class="nav-item">Startseite</a> </li> <li> <a href="downloads" id="drp "class="nav-item">Formularcenter</a> </li> <li> <a href="#" class="drp">Schulprofil</a> <div class="nav-content"> <div class="nav-sub"> <ul> <li><a href="baustein1">Qualitätsbaustein 1</a></li> <li><a href="baustein2">Qualitätsbaustein 2</a></li> <li><a href="baustein3">Qualitätsbaustein 3</a></li> <li><a href="baustein4">Qualitätsbaustein 4</a></li> </ul> </div> </div> </li> <li> <div class="login"> <a class="nav-item" style="float: right;" href="logout.php">Logout</a> </div> </li> </ul> </div> </header>
Code
Alles anzeigen.nav-main{ width: 100%; background-color: #333; height: 70px; color: #fff; display: flex; } .nav-main .logo{ font-family: "Acme",sans-serif; height: 40px; padding: 15px 30px; font-size: 1.4em; line-height: 40px; } .nav-main > ul{ margin: 0; padding: 0; flex: 1; display: flex; list-style-type: none; } .nav-main > ul > li{ } .nav-item{ display: inline-block; padding: 15px 20px; height: 40px; line-height: 40px; color: white; text-decoration: none; } .nav-item:hover{ color: white; background-color: black; } .nav-content{ position: absolute; top: 70px; overflow: hidden; background-color: #333; max-height: 0; } .nav-content a { color: #fff; text-decoration: none; } .nav-content a:hover{ text-decoration: underline; } .nav-sub{ padding: 20px; } .nav-sub ul { padding: 0; margin: 0; list-style-type: none; } .nav-sub ul li a{ display: inline-block; padding: 5px 0; } .nav-item:focus ~ .nav-content{ max-height: 400px; } .nav-content:hover{ max-height: 400px; } .nav-main>ul>li:last-child { margin-left: auto; }
-
Wenn ich etwas mit der ID "drp" hovere soll sich die Class "nav-content" die Höhe ändern. Wie geht das?
-
Ok, jetzt hats geklappt! Dankeschön!
-
Code
Alles anzeigenfont-family:"Segoe UI",Arial,sans-serif; margin: 0; font-size: 1em; } footer{ border-top: 5px solid grey; } footer a{ color: grey; text-decoration: none; } footer a:hover{ color: black; } header{ border-bottom: 5px solid grey; } body{ background-image: url(/img/bg.png); } .nav-main{ width: 100%; background-color: #333; height: 70px; color: #fff; display: flex; } .nav-main .logo{ font-family: "Acme",sans-serif; height: 40px; padding: 15px 30px; font-size: 1.4em; line-height: 40px; } .nav-main > ul{ margin: 0; padding: 0; display: flex; list-style-type: none; } .nav-main > ul > li{ } .nav-item{ display: inline-block; padding: 15px 20px; height: 40px; line-height: 40px; color: white; text-decoration: none; } .nav-item:hover{ color: white; background-color: black; } .nav-content{ position: absolute; top: 70px; overflow: hidden; background-color: #333; max-height: 0; } .nav-content a { color: #fff; text-decoration: none; } .nav-content a:hover{ text-decoration: underline; } .nav-sub{ padding: 20px; } .nav-sub ul { padding: 0; margin: 0; list-style-type: none; } .nav-sub ul li a{ display: inline-block; padding: 5px 0; } .nav-item:focus ~ .nav-content{ max-height: 400px; -webkit-transition: max-height 0.4s ease-in; -moz-transition: max-height 0.4s ease-in; transition: max-height 0.4s ease-in; } .nav-content:hover{ max-height: 400px; -webkit-transition: max-height 0.4s ease-in; -moz-transition: max-height 0.4s ease-in; transition: max-height 0.4s ease-in; } .nav-main>ul>li:last-child { margin-left: auto;
-
Tut mir leid hätte ich genauer beschreiben sollen. ( basti1012)
Sempervivum Habe es geändert, hat aber keine Wirkung gezeigt.
-
Anchor bleibt trotz "float: right" links.
HTML
Alles anzeigen<!doctype html> <html> <head> <title>Startseite | Schillerschule </title> <meta charset=utf-8> <link rel="stylesheet" href="styles/portfolio.css" media="screen"> <link href='https://fonts.googleapis.com/css?family=Baloo Bhaijaan' rel='stylesheet'> <link href='https://fonts.googleapis.com/css?family=Acme' rel='stylesheet'> </head> <body> <header> <div class="nav-main"> <div class="logo">Portfolio</div> <ul> <li> <a href="#" class="nav-item">Startseite</a> </li> <li> <a href="#" class="nav-item">Downloads</a> </li> <li> <a href="#" class="nav-item">Schulprofil</a> <div class="nav-content"> <div class="nav-sub"> <ul> <li><a href="baustein1.php">Qualitätsbaustein 1</a></li> <li><a href="baustein2.php">Qualitätsbaustein 2</a></li> <li><a href="baustein3.php">Qualitätsbaustein 3</a></li> <li><a href="baustein4.php">Qualitätsbaustein 4</a></li> </ul> </div> </div> </li> <li> <div class="logout"> <a class="nav-item" style="float: right;" href="logout.php">Logout</a> </div> </li> </ul> </div> </header>
und CSS:
Code
Alles anzeigenbody{ font-family:"Segoe UI",Arial,sans-serif; margin: 0; font-size: 1em; } footer{ border-top: 5px solid grey; } footer a{ color: grey; text-decoration: none; } footer a:hover{ color: black; } header{ border-bottom: 5px solid grey; } body{ background-image: url(/img/bg.png); } .login{ float: right; } .nav-main{ width: 100%; background-color: #333; height: 70px; color: #fff; } .nav-main .logo{ font-family: "Acme",sans-serif; float: left; height: 40px; padding: 15px 30px; font-size: 1.4em; line-height: 40px; } .nav-main > ul{ margin: 0; padding: 0; float: left; list-style-type: none; } .nav-main > ul > li{ float: left; } .nav-item{ display: inline-block; padding: 15px 20px; height: 40px; line-height: 40px; color: white; text-decoration: none; } .login{ float: right; } .nav-item:hover{ color: white; background-color: black; } .nav-content{ position: absolute; top: 70px; overflow: hidden; background-color: #333; max-height: 0; } .nav-content a { color: #fff; text-decoration: none; } .nav-content a:hover{ text-decoration: underline; } .nav-sub{ padding: 20px; } .nav-sub ul { padding: 0; margin: 0; list-style-type: none; } .nav-sub ul li a{ display: inline-block; padding: 5px 0; } .nav-item:focus ~ .nav-content{ max-height: 400px; -webkit-transition: max-height 0.4s ease-in; -moz-transition: max-height 0.4s ease-in; transition: max-height 0.4s ease-in; } .nav-content:hover{ max-height: 400px; -webkit-transition: max-height 0.4s ease-in; -moz-transition: max-height 0.4s ease-in; transition: max-height 0.4s ease-in; } .logout{ float: right; }