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

XF 1.2 How customize an individual node title

Discussion in 'Styling and Customization Questions' started by Matthew Hawley, Jul 18, 2013.

  1. Matthew Hawley

    Matthew Hawley Well-Known Member

    Hello, how do I customize the node title for a certain forum, I tried this and it didn't work.

    Code:
    .nodeTitle, #nodeDescription-8 {
    color: red;
    }
    @Shelley
     
    Last edited: Jul 18, 2013
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Each node has a unique class added to it:
    .node_#ID#

    Use that in your selectors.
     
  3. Matthew Hawley

    Matthew Hawley Well-Known Member

    Didn't work.

    Code:
    .nodeTitle .node_8 {
    color: red;
    }
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    Your selector is wrong. This may help you to write selectors and understand how they work (ie .class.another, .class > .class2, .class .class, etc):
    https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors

    Selectors are evaluated from left to right, so it looks for the first class first, then it moves down the DOM tree searching for any selectors after it using modifiers as described in the link I provided above.
     
  5. Shelley

    Shelley Well-Known Member

  6. Matthew Hawley

    Matthew Hawley Well-Known Member

  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    As I said above, your selector is wrong. Look at how the DOM is laid out, which elements have which classes, and the order in which they appear (parent > child relationship).
     
  8. Matthew Hawley

    Matthew Hawley Well-Known Member

    Also, I want each nodeTitle to be different.
     
  9. Shelley

    Shelley Well-Known Member

    Look at the code used the node titles are styled and you can use those as reference.
     
    Jeremy likes this.
  10. Matthew Hawley

    Matthew Hawley Well-Known Member

    Nothing is working...
     
  11. Shelley

    Shelley Well-Known Member

    Your ID will differ try the following insert your forum ID and choice of colour.

    Code:
    .node_38  .nodeTitle a{
    color: blue;
    }
     
  12. Matthew Hawley

    Matthew Hawley Well-Known Member

    Nope.
     
  13. Shelley

    Shelley Well-Known Member

    Yes it works Matthew i just tried it. Your doing something wrong.
     
    Jeremy likes this.
  14. Jeremy

    Jeremy XenForo Moderator Staff Member

    I used the above CSS and its working fine. You are most likely adjusting the .node_#ID# class incorrectly.
     
  15. Matthew Hawley

    Matthew Hawley Well-Known Member

    I swear I didn't.

    Code:
    .node_1  .nodeTitle a {
    color: red !important;
    }
    
    @Shelley could you try it on my forum?
     
  16. Shelley

    Shelley Well-Known Member

    Can you link me to the forum? And area you want to adjust?
     
  17. Jeremy

    Jeremy XenForo Moderator Staff Member

    You don't have a node of ID #1. The CSS can't find an element to work on.
     
  18. Matthew Hawley

    Matthew Hawley Well-Known Member

    ... I tried 7 too and it didn't work.
     
  19. Jeremy

    Jeremy XenForo Moderator Staff Member

    You also don't have a Node ID#7 on your forum home.
     
  20. Matthew Hawley

    Matthew Hawley Well-Known Member

    Are you looking on 2dmods? I'm not doing it on that website.
     

Share This Page