1

How can I make an horizontal menu in my website? I write this code and my menu appears in vertical. Thanks.

<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
4

2 回答 2

2

If you want, you could use an asp:menu

http://msdn.microsoft.com/en-us/library/ecs0x9w5%28v=vs.100%29.aspx

(This question was previously tagged with C#, so I'm assuming its asp.net - if its just html it won't work)

Otherwise if you just want a list of links, you could put them in a table in the same row

<table>
<tr>
<td><a href="">item1</a></td>
<td><a href="">item2</a></td>
..
</tr>
</table>
于 2013-04-06T12:09:37.277 回答
0

使用您在上一个答案中获得的表方法li{display:inline-block;}li {float:left}所有工作。

于 2013-04-06T20:33:39.983 回答