Hallo.
Habe eine Menü:
Thema 1
Thema 1.1
Thema 1.2
Thema 1.3
Thema 2
Thema 2.1
Thema 2.2
Thema 2.3
Dank Tutorials habe ich Sie einiger Maßen hinbekommen. Allerdings noch ein Problem: Ich will, das Thema 1 und 2 neben einander stehen und nicht untereinander. Mit display: inline; habe ich es nicht geschafft.
Danke
Habe eine Menü:
Thema 1
Thema 1.1
Thema 1.2
Thema 1.3
Thema 2
Thema 2.1
Thema 2.2
Thema 2.3
Dank Tutorials habe ich Sie einiger Maßen hinbekommen. Allerdings noch ein Problem: Ich will, das Thema 1 und 2 neben einander stehen und nicht untereinander. Mit display: inline; habe ich es nicht geschafft.
HTML:
<link rel="stylesheet" type="text/css" href="navi.css" />
<div id="navi">
<ul>
<li>Thema 1
<ul>
<li><a href="#">Thema 1.1</a></li>
<li><a href="#">Thema 1.2</a></li>
<li><a href="#">Thema 1.3</a></li>
</ul>
</li>
<li>Thema 2
<ul>
<li><a href="#">Thema 2.1</a></li>
<li><a href="#">Thema 2.2</a></li>
<li><a href="#">Thema 2.3</a></li>
</ul>
</li>
</ul>
</div>
<div style="clear:both;"></div>
Code:
*{
margin: 0;
padding: 0;
}
#navi{
width: 100%;
padding: 0 20px;
background: #003366;
font-family: Verdana;
font-size: 1em;
line-height: 1.5;
float: left;
}
#navi ul{
float: left;
width: 140px;
list-style-type: none;
}
#navi li{
font-size: 1em;
text-align: center;
color: #000;
border: 1px solid #003366;
background: #ff8000;
position: relative;
}
#navi a{
text-decoration: none;
display: block;
border: 1px solid #ccc;
text-align: center;
background: #ff9224;
color: #003366;
}
#navi a:hover{
color: #ff9224;
background: #003366;
}
#navi ul ul{
position: absolute;
z-index: 2;
display: none;
}
#navi ul li:hover ul{
display: block;
}
Danke