XF 1.5 How to make links clickable in a Xenforo notice

Magnoun

New member
Hey I'm trying to put some thread links in some xenforo notices In my forum but I can't figure out how to make the links clickable. Would greatly appreciate it if someone could tell me how.

Thanks
 
See here: http://www.w3schools.com/html/html_links.asp

That's also useful for any HTML you want to use, not just links.
Thank you, that worked but I tried giving the links color and so I added the html links color code that they give which is this one
<style>
a:link {color:green;background-color:transparent;text-decoration:none}
a:visited {color:pink;background-color:transparent;text-decoration:none}
a:hover {color:red;background-color:transparent;text-decoration:underline}
a:active {color:yellow;background-color:transparent;text-decoration:underline}
</style>

But it actually changed the colors of all the threads and forum titles, is there a way to set it to where it only affects the notice?

Thanks
 
But it actually changed the colors of all the threads and forum titles, is there a way to set it to where it only affects the notice?

Thanks

That is the wrong way to do what you want. What you did was use the style element which does indeed affect the entire content, whether in the header or within the body content as it is in a notice. (I think technically speaking these should go in the header anyway)

What you need in this case is an inline style within the tag itself e.g.

Code:
<a style="color:red" href="http://whatever">link text</a>

However when it's more complex as in your case (different colours for state of link) it's probably better to do it with a class.

In this case, add your CSS to the extra.css template and give the links a class, e.g. noticelink

Code:
a.noticelink:link {color:green;background-color:transparent;text-decoration:none}
a.noticelink:visited {color:pink;background-color:transparent;text-decoration:none}
a.noticelink:hover {color:red;background-color:transparent;text-decoration:underline}
a.noticelink:active {color:yellow;background-color:transparent;text-decoration:underline}

Then in your notice:

Code:
<a class="noticelink" href="http://whatever">link text</a>
 
Last edited:
Top Bottom