WordPress.org

Ready to get started?Download WordPress

Forums

Promotion Slider
Alternating Excerpt Sides (4 posts)

  1. AnnaGallow
    Member
    Posted 9 months ago #

    I am trying to get the sider to have different sides that the excerpt will display on. For example:

    Slide 1 - excerpt on left
    Slide 2 - excerpt on right
    Slide 3 - excerpt on left
    Slide 4 - excerpt on right

    Is there any way to control this per slide or to apply a class to specific slides to make the excerpt appear on the left vs. the right?

    Thank you in advance for all your help!

    http://wordpress.org/plugins/promotion-slider/

  2. Micah Wood
    Member
    Plugin Author

    Posted 8 months ago #

    @AnnaGallow,

    You could use the nth-child selector in CSS3: http://www.w3schools.com/cssref/sel_nth-child.asp

    That won't work in IE8, but if that is a concern, you could use JavaScript to add some classes.

  3. AnnaGallow
    Member
    Posted 8 months ago #

    Hi Micah,

    Thanks that is a great idea... one question about how that works though. Is this the selector I should be using?

    .promo_slider_excerpt:nth-child(even) {my css here;}

    I tried a couple of different selectors and can't seem to find the right one. Any insight you could provide would be much appreciated.

    Thanks!

  4. Micah Wood
    Member
    Plugin Author

    Posted 7 months ago #

    @annagallow,

    Yes, that selector should be correct. Something like this should alternate the orientation of the excerpt text for all common browsers except IE8:

    .promos_slider_excerpt:nth-child(even) {
        text-align: right;
    }

Reply

You must log in to post.

About this Plugin

About this Topic