2015-05-21 38 views
-3

我有在博客下面的HTML代碼horitzontal條:如何刪除html欄中的垂直分隔符?

#menuh { 
 
\t background: #D8D8D8; 
 
\t float: left; 
 
\t list-style: none; 
 
\t margin: 0px; 
 
\t padding: 1px; 
 
\t display:block; 
 
\t height:auto; 
 
\t text-align:center; 
 
} 
 
#menuh li { 
 
\t display: inline; 
 
\t font: 67.5% Arial, Tahoma, Helvetica, FreeSans, sans-serif; 
 
\t text-align: center; 
 
\t margin: 0 44px 0 44px;; 
 
\t padding: 0px; 
 
} 
 
#menuh a { 
 
\t background: #D8D8D8 
 
\t url()no-repeat left top;margin:0 1.5px 0 1.5px;padding:0 0 0 7px;text-decoration:none;) bottom right no-repeat; 
 
\t color: #0B615E; 
 
\t display: block; 
 
\t height: auto; 
 
\t text-align: center; 
 
\t margin: 0px; 
 
\t padding: 5px 23.8px; 
 
\t text-decoration: none; 
 
\t font-weight: normal; 
 
\t font-size: 14px; 
 
} 
 
#menuh a:hover { 
 
\t background: #A9D0F5 url() bottom center no-repeat;  
 
\t color: #aeaab0  
 
\t padding-bottom: 10px; 
 
\t }
<div id="mh"> 
 
    <ul id="menuh"> 
 
\t <li><a href="http://adress1">adress1</a></li> 
 
\t <li><a href="http://adress2">adress2</a></li> 
 
\t <li><a href="http://adress3">adress3</a></li> 
 
\t <li><a href="http://adress4">adress4</a></li> 
 
    </ul> 
 
</div>

這段代碼的輸出是:

enter image description here

我想刪除那些垂直分隔符,但不知道如何。在此先感謝

+2

你在你的CSS有一些語法錯誤。 – j08691

+2

片段的渲染與圖像不一樣,你可能會忘記一些東西。順便說一句'#menuh li,#menuh a {border:none; }' – Bobot

+1

您的菜單不會內聯呈現。將'#menuh a'的規則更改爲'display:inline-block'。然後從上面的例子中我看不到任何垂直條。小提琴在這裏:https://jsfiddle.net/9jfch7oL/ –

回答

1

它的工作對我來說嘗試這個

#menuh { 
 
\t background: #D8D8D8; 
 
\t float: left; 
 
\t list-style: none; 
 
\t margin: 0px; 
 
\t padding: 1px; 
 
\t display:block; 
 
\t height:auto; 
 
\t text-align:center; 
 
} 
 
#menuh li { 
 
\t float: left; 
 
\t font: 67.5% Arial, Tahoma, Helvetica, FreeSans, sans-serif; 
 
\t text-align: center; 
 
\t margin: 0 44px 0 44px;; 
 
\t padding: 0px; 
 
} 
 
#menuh a { 
 
\t background: #D8D8D8 
 
\t url()no-repeat left top;margin:0 1.5px 0 1.5px;padding:0 0 0 7px;text-decoration:none;) bottom right no-repeat; 
 
\t color: #0B615E; 
 
\t display: block; 
 
\t height: auto; 
 
\t text-align: center; 
 
\t margin: 0px; 
 
\t padding: 5px 23.8px; 
 
\t text-decoration: none; 
 
\t font-weight: normal; 
 
\t font-size: 14px; 
 
} 
 
#menuh a:hover { 
 
\t background: #A9D0F5 url() bottom center no-repeat;  
 
\t color: #aeaab0  
 
\t padding-bottom: 10px; 
 
\t }
<div id="mh"> 
 
    <ul id="menuh"> 
 
\t <li><a href="http://adress1">adress1</a></li> 
 
\t <li><a href="http://adress2">adress2</a></li> 
 
\t <li><a href="http://adress3">adress3</a></li> 
 
\t <li><a href="http://adress4">adress4</a></li> 
 
    </ul> 
 
</div>

+0

background:#D8D8D8 \t url()no-repeat left top; margin:0 1.5px 0 1.5px; padding:0 0 0 7px; text-decoration:none; )右下不重複; ? – Dmitriy

+0

這是什麼?解釋 –

+0

我必須調試它。我從某個地方拿走了它。不知道原因。非常感謝代碼,Bilal。然而,縱向分隔符在我將它添加到博客時仍然出現。正如我之前評論過的,使用#menuh a {border:none; }解決了這個問題。 – wuampa