Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1277793
    kynate33
    Participant

    I have made each column header in my table featured to get the style that goes with it. I want each column header background to be a different color. I have tried using some variations of nth child(x), but cant get it to work. Please help.

    The table I am working with can be found here:

    http://www.mcclellangray.com/service-options/

    #1277845
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! I checked your page and it doesn’t exist, have you deleted the page? Please give us the page URL so we can take a look.

    Thanks!

    #1277947
    kynate33
    Participant

    It is there now, it is a new page. Please try and view it again.

    Thanks

    #1278210
    Lely
    Moderator

    Hello There,

    I tried the page too but it is page not found. See this:http://screencast-o-matic.com/watch/cDlnVYQlz3

    #1278728
    kynate33
    Participant

    Ok, I’m not sure what is going on. This is a page that is not complete. I didn’t really want to publish it, but I did so that I could get an answer to my question. Is there a way for you to answer my question without seeing the page? Is there not a standard way to change the color of the individual headers for the price table? I will see what I can do to get the page live in the meantime.

    #1278746
    kynate33
    Participant

    Ok, it is live now.

    #1278795
    Joao
    Moderator

    Hi There,

    Please try the following code:

    .x-pricing-column.featured h2:first-of-type{
        background: red;
    }
    
    .x-pricing-column.featured h2:nth-child(2) {
        background: green;
    }
    
    .x-pricing-column.featured h2:nth-child(3) {
        background: yellow;
    }
    
    .x-pricing-column.featured h2:last-child {
        background: orange;
    }

    Hope it helps

    Joao

    #1278868
    kynate33
    Participant

    Didn’t work. When I copy this into the global css, all of the featured headers are red.

    #1279039
    Jade
    Moderator

    Hi there,

    Please use this code:

    .page-id-1817 #x-section-2 .x-pricing-table .x-pricing-column:nth-child(1) h2 {
        background: red;
    }
    
    .page-id-1817 #x-section-2 .x-pricing-table .x-pricing-column:nth-child(2) h2 {
        background: green;
    }
    
    .page-id-1817 #x-section-2 .x-pricing-table .x-pricing-column:nth-child(3) h2 {
        background: yellow;
    }
    
    .page-id-1817 #x-section-2 .x-pricing-table .x-pricing-column:nth-child(4) h2 {
        background: orange;
    }

    Hope this helps.

    #1279083
    kynate33
    Participant

    This produces the same result. All of the headers are red.

    #1279141
    kynate33
    Participant

    What could the reason be that the red color is carrying over to the other headers? It seems to me that the nth-child call outs are not working properly.

    #1279331
    Friech
    Moderator

    Hi There,

    Its on different colour now, did you resolve the issue?

    http://image.prntscr.com/image/a138c1fdc43c4a24962ebb00455bdb19.png

    Please clear your browser’s cache.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1277793 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>