Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #446394

    Dear Enfold crew,

    to differentiate, I try to use a cool new css function to give some extra dynamics to my site.

    Basically I would like the title box background in Ajax portfolio, to be different every second portfolio item in an overview like this:

    http://kriesi.at/themes/enfold/portfolio/portfolio-ajax/

    Then, here comes the css I found on this page; http://amethystwebsitedesign.com/alternate-colors-in-post-and-widget-titles-with-css-nth-of-type/

    With this css, every second post (2n) starting on 2 (2n2), so 2, 4, 6, 8, etc.. is given it’s own color using

    .post:nth-of-type(2n+2) .entry-title a {
    	color: #046ca3; /* dark blue */
    }

    My problem is that I cannot find the container class where this background is in, so I can copy it to my child css and create the code. I have come as far as this:

    
    #blocks .grid-content {
    	background-color: red;
    }
    
    #blocks .grid-entry-title  {
    	background-color: red;
    }

    This changes the color, but if I insert

    #blocks .grid-content:nth-of-type(2n+2) {
    	background-color: red;
    }
    
    #blocks .grid-entry-title:nth-of-type(2n+2)  {
    	background-color: red;
    }

    it does not work. I got the feeling i’m not addressing the right container, so I was hoping you guy’s could help me pointing that out. So I’m looking for the right class to adress, in order to make nth-of-type effectively work.

    Looking forward, thanks, Daniël

    #447732

    Hey Danielkuipers!

    Thank you for using our theme.

    This CSS cannot work, because of the HTML structure – the divs have to be on the same level (see http://www.w3schools.com/cssref/sel_nth-of-type.asp and open one of the examples).

    To achieve this, you will have to modify the core files or use jQuery. But this is customization and out of the scope of support.

    Best regards,
    Günter

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.