我试过了所有的东西,只要我使用"\n" or
or
,它似乎不工作。 我试过
我应该在哪里放置什么东西?
它看起来像离开,但我需要它像右侧,对方
portfolio$query_nav = mysql_query("SELECT * FROM `nav` ");
while ($query_row_nav = mysql_fetch_assoc($query_nav))
{
?>
$meer = $query_row_nav['title'];
//$desc_inject = '';
//$sub_string = substr($desc_inject, 0, 200);
echo /*$sub_string." " . '' . */'' . $meer .'';
?>
}
?>
CSS
/* Main Nav */
#navigation{
background: #231f20;
font-size: 1.143em;
height: 50px;
line-height: 30px;
margin-top: 57px;
margin-right: 2px;
text-align: center;
width: 1010px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
#navigation ul, #navigation li {
list-style:none;
padding:0;
margin:0;
display:inline;
}
#navigation ul li{
float:left;
position:relative;
}
#navigation ul li a{
display: inline-block;
padding:10px 30px;
margin:1px;
font-size:18px;
white-space:nowrap;
border-radius:3px;
text-decoration: none;
height: 30px;
text-decoration: none;
}
#navigation ul ul{
position:absolute;
top:-99999px;
left:0;
opacity: 0;
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
z-index:497;
background:#333;
padding: 2px;
border:1px solid #231f20;
border-top:none;
box-shadow:#111 0 3px 4px;
border-bottom-left-radius:6px;
border-bottom-right-radius:6px;
}
#navigation ul ul ul {
position:absolute;
top:-99999px;
left:100%;
opacity: 0;
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
border-radius:6px;
border:1px solid #231f20;
}
#navigation ul li:hover>ul{
opacity: 1;
position:absolute;
top:99%; left:0;
}
#navigation ul ul li:hover>ul{
position:absolute;
top:0;
left:100%;
opacity: 1;
z-index:497;
background:#231f20;
}
#navigation li:first-child a {
border-top-left-radius: 3px;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-left-radius: 3px;
}
+0
它看起来像你可能浮动的东西,你可以包括有关UL的CSS? –
+0
你尝试过'display:block'吗?如果他们漂浮,删除浮动。此外,你应该给我们你的完整的HTML和CSS代码 –
+0
我已经添加了CSS –