I have a ul tag and I want to access the a tag and change its style, this code works.
ul li a{ font-weight: bold !important; }
But when I put a class to the ul and use it. It does not work
ulClass li a{ font-weight: bold !important; }
I have a ul tag and I want to access the a tag and change its style, this code works.
ul li a{ font-weight: bold !important; }
But when I put a class to the ul and use it. It does not work
ulClass li a{ font-weight: bold !important; }
I have tried changing the class to id and replaced the css.
From this
.ulClass li a {font-weight: bold !important;}
To this and it worked.
#ulId li a {font-weight: bold !important;}
I don't know whats the difference can someone explain to me?
Apply below syntax and try again.here you should use .
before the class name
ul.class li a { font-weight: bold !important; }
or
.class li a { font-weight: bold !important; }
@Jonas So ideally it should work with class. It could be one of the two IMO :
some basic error in the html skeleton
you've got a conflicting css rule (with !important
which overrides this styling)
Mind posting the code snippet ?