Hey Derpers,
Ik ben bezig met een site te maken voor een opdracht voor school. Alleen ik zit nu met het probleem dat 1 onderdeel naar onderen wordt geduwd "Login, Registreer, Winkelmandje" dit wil ik gewoon op 1 lijn met de rest maar dan helemaal naar rechts met een margin-right van 15px.
HTML CODE
<!DOCTYPE HTML> <html> <head> <title></title> <meta charset='utf-8'> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <div id='wrapper'> <!-- Begin Wrapper --> <div id='navigatie'> <!-- Begin Navigatie --> <div id='nav-top-left'> <!-- Begin Nav-Top-Left --> <h2>Thee Idee</h2> </div> <!-- Einde Nav-Top-Left --> <div id='nav-top-mid'> <!-- Begin Nav-Top-Mid --> <ul> <li><a class='active' href='#'>Home</a></li><li> <a href='#'>Theezakjes</a></li><li> <a href='#'>Theekopjes</a></li><li> <a href='#'>Theepotten</a></li><li> <a href='#'>Contact</a></li> </ul> <ul class='nav-top-right'> <li><a href='#'>Login</a></li><li> <a href='#'>Registreer</a></li><li> <a href='#'>Winkelmandje</a></li><li> </ul> </div> <!-- Einde Nav-Top-Mid --> </div> <!-- Einde Navigatie --> </div> <!-- Einde Wrapper --> </body> </html>
CSS
* { padding: 0px; margin:0px; } body{ background-image: url("http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/upfeathers.png"); font-family: Arial, Helvetica, sans-serif; } /*****************/ /* Navigatie */ /*****************/ #navigatie{ width: 100%; height: 45px; background-color:#27ae60; border-bottom:2px solid #1d623b; } /*****************/ /* Top Left Nav */ /*****************/ #nav-top-left{ margin-left: 15px; padding-top: 8px; position: relative; float: left; display: inline-block; } /*****************/ /* Top Mid Nav */ /*****************/ #nav-top-mid{ margin-left: 130px } #nav-top-mid ul{ display: inline-block; } #nav-top-mid ul li{ display: inline-block; width: auto; height: 45px; } #nav-top-mid ul li a{ display: block; padding: 13px 25px; 0px; 0px; text-decoration: none; color: white; font-weight: bold; text-shadow: 0 -1px rgba(0,0,0,0.3); } #nav-top-mid ul li:hover{ transition: 0.5s; background-color: #1c7d45; } .nav-top-right{ float: right; margin-right: 15px; }
Ik hoop dat jullie mij kunnen helpenLaatst bewerkt: 02-12-15 22:15 door: Freek