1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Make whole Notice box clickable

Discussion in 'Styling and Customization Questions' started by Skylined, Aug 27, 2015.

  1. Skylined

    Skylined Active Member

    To make things easier and to get more user registrations, I would like to make the whole Notice box clickable, not just the text in it.

    Is it possible?

    Last edited: Aug 27, 2015
    rafass likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    There's actually a neat little trick, borrowing an approach from the alerts drop down that can sort of do this.

    It's a bit long winded, for what it is, but it has a nice effect.

    Your notice content needs to have a rather strict structure:
    <ul style="margin: 0">
        <li class="PopupItemLink" style="list-style: none; cursor: pointer;">
            This is a link to a thread <a href="index.php?threads/1" class="PopupItemLink">click here</a> to read it.
    Any content inside the <li> tag (must have a PopupItemLink class) will be clickable, and the link it will activate is the <a> tag (must also have a PopupItemLink class).

    It's not exactly how you want it - only the content inside the <li> tag will be clickable, but that's still likely to be more effective (and easier to use) than just a small link.

    You will only be able to have one a.PopupItemLink inside an li.PopupItemLink for this to work.
    Skylined and rafass like this.
  3. Skylined

    Skylined Active Member

    Thank you @Chris D. :)

    I've cheated a little bit, I've added a couple of </br> tags to also convert the empty parts into a link.

    Chris D likes this.

Share This Page