2012-02-02 47 views
0

我的代码如下:2行里的菜单项

<ul> 
    <li> <a href=""> Custom Decor</a></li> 
    <li> <a href=""> Home Exterior </a></li> 
    <li> <a href=""> Cleaning Services </a></li> 
    <li> <a href=""> Heating & Cooling </a></li> 
    <li> <a href=""> Parts, Repair & Maintanence </a></li> 
    <li> <a href=""> Energy Effeciency </a></li> 
    <li> <a href=""> Sears Telecom </a></li> 
    <li> <a href=""> Protection Agreements </a></li> 
</ul> 

我所拥有的是 - enter image description here

我要的是 -

以下自定义

-Decor

- 在家外部

-Se清洗下rvices等

像这样的事情enter image description here

两条线,2个字..我如何在CSS中这样做吗?

+0

http://qrayg.com/experiment/cssmenus/ – Infinity 2012-02-02 10:07:53

+0

第二行是否应该始终可见? – 2012-02-02 10:09:26

+0

对于行,我假设你的意思是第二行“文本”。是的,应该指定宽度为“li”项目的应该是 – 2012-02-02 10:11:19

回答

3

我可以建议你两种解决方案(第二recomended):

  • 插入<br />到您的文本,其中新线应插入,或
  • 指定您的项目的CSS宽度之间放&nbsp;这些词应该出现在一行中。
+0

? – 2012-02-02 10:08:31

+0

在我看来,这将是最好的选择。 – 2012-02-02 10:12:34

+0

对不起,不行。 – 2012-02-02 10:21:57