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

XF 1.1 Styling notices

Discussion in 'XenForo Questions and Support' started by AndreaMarucci, Dec 9, 2011.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    I would like to make a "Merry Christmas" banner appear at december 25th and I've made some tests. The only problem I'm facing is that my banner always appear inside the blue box. How can I make it disappear so only the image is shown?

    Screenshot 12-2455905 alle 11.53.03.png
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Uncheck Add default notice text styling and add your own styling.

    You will also need to change the Style Property settings for Notices in general.

    With 1.1.1 the notice ID is exposed, so it may be possible to do notice specific styling using EXTRA.css.
     
  3. RobParker

    RobParker Well-Known Member

    Was that a typo or are we due a new release?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    No typo.

    There are always going to be new releases.
     
  5. RobParker

    RobParker Well-Known Member

    By "due" I meant imminent, sorry.
     
  6. AndreaMarucci

    AndreaMarucci Well-Known Member

    I imagine that I've to do something similar but I'm not able to do that by myself. It suffice to hide the blue box by now ;)
     
  7. Andrej

    Andrej Well-Known Member

    Hello Brogan,
    Could you please explain a bit more about that? So with this I will be able to have different styling for different notices? If yes, what do I start with in EXTRA.css?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    You can just use the class for each specific notice, for example: panel Notice DismissParent notice_1
     
    Andrej likes this.
  9. Andrej

    Andrej Well-Known Member

    EXTRA.css content:
    Code:
    .panel Notice DismissParent notice_1
    background-attachment: scroll;
    background-clip: border-box;
    background-color: rgb(235, 252, 223);
    background-image: none;
    background-origin: padding-box;
    background-position: 0% 0%;
    background-repeat: repeat;
    background-size: auto;
    border-bottom-color: rgb(164, 207, 164);
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-left-color: rgb(164, 207, 164);
    border-left-style: solid;
    border-left-width: 1px;
    border-right-color: rgb(164, 207, 164);
    border-right-style: solid;
    border-right-width: 1px;
    border-top-color: rgb(164, 207, 164);
    border-top-style: solid;
    border-top-width: 1px;
    color: rgb(14, 68, 14);
    font-size: 12px;
    line-height: 1.6;
    padding-bottom: 10px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    }
    This is the code I have, but it does not seem to work on the default style? What I am doing wrong?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I haven't looked into this yet, but you may need to uncheck the "Add default notice text styling" and/or remove any Style Properties settings and/or use !important.

    I'm still writing the Help Manual entry for Notices so will get to that soon and investigate how it works.
     
    Andrej likes this.
  11. Brogan

    Brogan XenForo Moderator Staff Member

    Try using just .notice_1 as the class.
     
  12. Andy.N

    Andy.N Well-Known Member

    Is it possible to move the notice to top of the page, above the admin strip where you have the Report now. With XF 1.1.1, it's possible to disable the scrolling and we can stack multiple alerts on top of another, I think it would make a huge different in how people will see the notices.
     
  13. Anthony Parsons

    Anthony Parsons Well-Known Member

    You can move anything by moving the template insert point.... notices are inserted directly into PAGE_CONTAINER, so you can shift its insert point to make a global placement change.
     
  14. Andy.N

    Andy.N Well-Known Member

    English please :)
     
  15. Anthony Parsons

    Anthony Parsons Well-Known Member

    In the page_container template you will find:

    <xen:hook name="page_container_notices">
    <xen:include template="notices" />
    </xen:hook>

    This is the insert point for the notices template into Xenforo pages.

    Move that up or down, to the insert point within the page you want it to display at. That is how you shift the notice location in your style.
     
    Andy.N likes this.
  16. AndreaMarucci

    AndreaMarucci Well-Known Member

    That's another issue. I would like to solve the style one before ;)
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    I have already answered your question in the second post.
     
  18. AndreaMarucci

    AndreaMarucci Well-Known Member

    I know Brogan. I've unchecked what you've suggested but I've also asked for help on styling and I was following Andrej posts...
     
  19. Anthony Parsons

    Anthony Parsons Well-Known Member

    What would you like to style, specifically Andrea?

    If you're talking about removing the overall style border and background for the notice box, then I don't see a way that can be done, as that is on the outer of the notice specifically, thus controlled overall by the style properties.

    The notice class would need to be on the outer of the notice styling to control an individual notice to that degree and depth, being remove background, borders, etc... completely custom.

    Maybe XF for a better term should have applied the notice class to the outer wrapper of notices, that way a notice can be custom styled vs. partially styled based only on the inner content.

    Maybe something to raise as a minor change to XF notices?
     
  20. Anthony Parsons

    Anthony Parsons Well-Known Member

Share This Page