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