ul
{
list-style-type:none;
margin:0;
padding:0;
}
a:link,a:visited
{
display:block;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
width:120px;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active
{
background-color:#7A991A;
}
http://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_vertical_advanced
i would like to apply the above styles to a link button, was id changes by browsers wish(which is kind of a requirement so cannot keep selection on "id" on link button
how to make this possible?
In the code above, you are applying different styles to different elements. The only way you can combine classes is if you apply all styles to all elements. If you need to mix and match, you must have separate classes.
Although, you could move most of your a:link,a:visited rules into the ul class definition.