tr:commandlink color specified in css is not working,while the same is working in inline style

StackOverflow https://stackoverflow.com/questions/23397298

  •  13-07-2023
  •  | 
  •  

سؤال

<tr:commandLink inlineStyle="color:green" value="mylink" /> 

shows "mylink" in green , while the below line of code doesnt change color of link

<tr:commandLink styleClass="myStyle" value="mylink" /> 

and css is below

<style>
.myStyle
{color:green;}

</style>  

when i try to change the color of the link by using style class it is not changing. Could anyone help me?

هل كانت مفيدة؟

المحلول

It looks like trinidad skin is overriding your color. To prevent this, you need to set !important in your style.

<style>
.myStyle {color:green !important;}
</style>  

نصائح أخرى

Try

<h:commandLink>
  <h:outputText value="myLink" styleClass="myStyle" />
</h:commandLink>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top