schwerminator
New member
mir ist es entfallen: wie kann man div-elemente nebeneinander und nich untereinander positionieren? kurz: wie verhindere ich einen zeilenumbruch?
schwerminator
schwerminator
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
/* Menu CSS Start */
#menu {
float: left;
width: 200px;
}
#navi {
float: left;
width: 240px;
margin-top: 75px;
}
#navi a {
font: bold 12px Arial, Helvetica, sans-serif;
padding: 5px;
text-decoration: none;
border: 1px solid #fff;
width: 150px;
margin: 3px 100;
color: #fc0;
background: #257;
text-align: center;
}
#navi a:link {
color:#fc0;
background: #257;
}
#navi a:visited {
color:#fff;
background: #257;
}
#navi a:hover {
color:#000;
border:1px solid #257;
background: #fff;
}
#navi a:active {
color: #fc0;
background: #fff;
}
#navi a .showcase {
display: none;
}
#navi a:hover .showcase {
position: absolute;
top: 100px;
left: 50px;
display: block;
width: 150px;
font: bold 0.92em Verdana, Arial, Helvetica, sans-serif;
background: #fff;
border: 1px dashed #257;
color: #000;
padding: 5px;
}
<html>
<head>
<title>HSG Eintracht Gadderbaum Jugendseite</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="basic.css" type="text/css" />
<link rel="stylesheet" href="menu1.css" type="text/css" />
</head>
<body>
<div id="navi">
<a href="#">m-A-Jugend</a>
<a href="#">m-B-Jugend</a>
<a href="#">m-C-Jugend</a>
<a href="#">m-D-Jugend</a>
<a href="#">gem.-E-Jugend</a>
<a href="#">E-Jugend-Sonderstaffel</a>
<a href="#">Minis</a>
<!--navi--></div>
<div id="inhalt">
hallo
<!--inhalt--></div>
</body>
</html>
NewNoise schrieb:Hallo,
wo muss ich den oben genannten Code in meinem (s.u.) einfügen?
CSS:
Code:/* Menu CSS Start */ #inhaltundnavi { clear:both; } #inhalt { float:left; } #menu { float: left; width: 200px; } #navi { float: left; width: 240px; margin-top: 75px; } #navi a { font: bold 12px Arial, Helvetica, sans-serif; padding: 5px; text-decoration: none; border: 1px solid #fff; width: 150px; margin: 3px 100; color: #fc0; background: #257; text-align: center; } #navi a:link { color:#fc0; background: #257; } #navi a:visited { color:#fff; background: #257; } #navi a:hover { color:#000; border:1px solid #257; background: #fff; } #navi a:active { color: #fc0; background: #fff; } #navi a .showcase { display: none; } #navi a:hover .showcase { position: absolute; top: 100px; left: 50px; display: block; width: 150px; font: bold 0.92em Verdana, Arial, Helvetica, sans-serif; background: #fff; border: 1px dashed #257; color: #000; padding: 5px; }
HTML:
Code:<html> <head> <title>HSG Eintracht Gadderbaum Jugendseite</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="basic.css" type="text/css" /> <link rel="stylesheet" href="menu1.css" type="text/css" /> </head> <body> <div id="inhaltundnavi"> <div id="navi"> <a href="#">m-A-Jugend</a> <a href="#">m-B-Jugend</a> <a href="#">m-C-Jugend</a> <a href="#">m-D-Jugend</a> <a href="#">gem.-E-Jugend</a> <a href="#">E-Jugend-Sonderstaffel</a> <a href="#">Minis</a> <!--navi--></div> <div id="inhalt"> hallo <!--inhalt--></div> <!--inhaltundnavi--></div> </body> </html>