0

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

NullPoiиteя
  • 56,591
  • 22
  • 125
  • 143
rangasathish
  • 595
  • 6
  • 13
  • 25

4 Answers4

3

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;
}
Mr. Alien
  • 153,751
  • 34
  • 298
  • 278
  • +1 sorry alien i did not know when posting .. our answer is same ...even http://stackoverflow.com/questions/13774909/how-to-set-border-style-property-to-none-in-unordered-list/13774917#comment18941029_13774917 – NullPoiиteя Dec 08 '12 at 09:07
  • 1
    @NullPointer hey it's k bro no issue :) I don't mind whoever the answer gets selected as correct, I just gave the answer, my job is done – Mr. Alien Dec 08 '12 at 09:14
0

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?

Community
  • 1
  • 1
NullPoiиteя
  • 56,591
  • 22
  • 125
  • 143
  • @rangasathish i am not sure what you want exactly ? could show image – NullPoiиteя Dec 08 '12 at 05:54
  • @rangasathish it mean you are overriding other css ... please check stackoverflow.com/questions/13743671/is-important-bad-for-performance/13745254 – NullPoiиteя Dec 08 '12 at 05:59
  • how get rid of that. If any way to delete last `li` element border property please let me know. – rangasathish Dec 08 '12 at 06:04
  • @HelloWorld noop .. i did not even know that alien answered .. in the mean time i was trying to format other answer you might want to check http://stackoverflow.com/posts/13774915/revisions and codepad.org/v4GKDIDs – NullPoiиteя Dec 08 '12 at 06:18
0

Try this, it will work

.noBorder
{
border-right:0px!important;
}
Rajiv Pingale
  • 995
  • 9
  • 27
-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;
}
NullPoiиteя
  • 56,591
  • 22
  • 125
  • 143