rangasathish
rangasathish

Reputation: 605

how to set border style property to none in unordered list?

i am designing one drop down list with css Here is my html code:

enter image description here

i have set each li a property border-right to border-right:1px dashed silver; i want to delete that property for last li a element

and here is css code :

 #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;
 }

i want to delete right-border of the last list software Developments so i tried with noBorder class. but can't give any solution please can any one let me know thanks advance

Upvotes: 0

Views: 270

Answers (4)

NullPoiиteя
NullPoiиteя

Reputation: 57322

you can do this by

border:  none !important;

it will remove all border

to remove right border ony try

border-right: none !important;

Good Read

Is !important bad for performance?

Upvotes: 0

Rajiv Pingale
Rajiv Pingale

Reputation: 1015

Try this, it will work

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

Upvotes: 0

user1887241
user1887241

Reputation: 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;
}

Upvotes: -1

Mr. Alien
Mr. Alien

Reputation: 157384

Am not sure which border are you talking about but try this if you want to remove the border from last li

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

Upvotes: 3

Related Questions