Reputation: 605
i am designing one drop down list with css Here is my html code:
i have set each
li a
property border-right toborder-right:1px dashed silver
; i want to delete that property for lastli 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
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
Reputation: 1015
Try this, it will work
.noBorder
{
border-right:0px!important;
}
Upvotes: 0
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
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