You need to sign in to do that
Don't have an account?
Mohammed Arshad
Help on applying CSS attribute 'style' into <apex:outputText>
I am trying to apply a style in the <apex:outputText> but it doesn't work.
Below is the code:
<apex:outputText value="Please refer this link for more information <a href =https://www.w3schools.com/>https://www.w3schools.com</a>"/>
So now i wanted to give some css touch to the above hyperlink by changing the
<apex:outputText value="Please refer this link for more information <a style=color:antiquewhite;text-decoration:underline;padding:42px; href =https://www.w3schools.com/>https://www.w3schools.com</a>"/> etc... but when i try to put the style in the <a> tag it is not working. Can anyone help me on this.
Thanks
Below is the code:
<apex:outputText value="Please refer this link for more information <a href =https://www.w3schools.com/>https://www.w3schools.com</a>"/>
So now i wanted to give some css touch to the above hyperlink by changing the
<apex:outputText value="Please refer this link for more information <a style=color:antiquewhite;text-decoration:underline;padding:42px; href =https://www.w3schools.com/>https://www.w3schools.com</a>"/> etc... but when i try to put the style in the <a> tag it is not working. Can anyone help me on this.
Thanks
All Answers
I tried as per your suggestion but it didn't work. I have put in this way..
<apex:outputText value="Please refer this link for more information"> <a style=color:antiquewhite;text-decoration-line:underline;padding:60px; href="https://www.w3schools.com">https://www.w3schools.com</a></apex:outputText>
But it throws this error :
Error: Open quote is expected for attribute "style" associated with an element type "a".
Try below code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
I have applied the above code but that too didn't help and i am on the same page..
Please try the following (updated) code: (fix of you code) A better way to do the same:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Thanks for your help!!!!
The issue is resolved now