2012-12-08 91 views
0

我設計一個下拉的CSS 以下列表是我的html代碼:如何在無序列表中將邊框樣式屬性設置爲none?

enter image description here

我已分別li a財產右邊框設置爲border-right:1px dashed silver;我想刪除屬性最後li a元素

這裏是CSS代碼:

#navigation 
{ 
    display:inline-table; 
    text-align:center; 
    background:silver; 
} 
#navigation li 
{ 
float:left; 
list-style:none; 
padding:2px 10px 2px 10px; 
} 
#navigation a 
{ 
display:block; 
text-decoration:none; 
color:green; 
font-weight:bold; 
padding:5px; 
border-right:1px dashed green; 
} 
.noBorder 
{ 
display:block; 
text-decoration:none; 
color:red; 
font-weight:bold; 
padding:5px; 
border:0px; 
} 
#navigation a:hover 
{ 
color:yellow; 
background:black; 
} 

我想刪除最後一個列表software Developments的權界,所以我試圖用 noBorder類。但不能給出任何解決方案請任何一個可以讓我知道 感謝推進

回答

3

我不知道它的邊界你在說什麼,但如果你想從去年li

.noBorder { 
    border-right: none !important; 
} 
+0

+1抱歉外星人我不知道什麼時候發佈..我們的答案是一樣的......即使http://stackoverflow.com/questions/13774909/how-to-set-border-style-property-to-none-in-unordered-list/13774917#comment18941029_13774917 –

+1

@NullPointer嘿這是K兄弟沒有問題:)我不介意答案被選定爲正確的人,我只是給出了答案,我的工作已經完成 –

-1
#navigation { 
    display: inline - table; 
    text - align: center; 
    background: silver; 
} 
#navigationli { 
    float: left; 
    list - style: none; 
    padding: 2px 10px 2px 10px; 
} 
#navigationa { 
    display: block; 
    text - decoration: none; 
    color: green; 
    font - weight: bold; 
    padding: 5px; 
    border - right: 1px dashed green; 
} 
.noBorder { 
    display: block; 
    text - decoration: none; 
    color: red; 
    font - weight: bold; 
    padding: 5px; 
    border: 0px; 
} 
#navigationa: hover { 
    color: yellow; 
    background: black; 
} 
+0

你可能喜歡做這個http://codepad.org/wya91Vo5,並嘗試http://jsbeautifier.org/ –

+0

你不喜歡任何空間嗎? –

+0

@RajivPingale如果它的形式我檢查編輯歷史 –

0

您可以通過

border: none !important; 

爲此,它會刪除所有邊境

刪除右邊框ONY嘗試

​​

好閱讀

Is !important bad for performance?

+0

我試過這個,但我不能得到解決方案 – rangasathish

+0

@rangasathish我不確定你想要什麼?可以顯示圖像 –

+0

謝謝@NullPointer它工作正常。通過添加'!important' – rangasathish

0

刪除邊框試試這個試試這個,它會工作

.noBorder 
{ 
border-right:0px!important; 
} 
相關問題