Okay
  Public Ticket #149873
Center and adjust width of Testimonial Content
Closed

Comments

  • Fake started the conversation
    Hi, I'm trying to make my testimonials only display at 80% of the width of the slider and to be centred on the page. I'm also fixing the height of the testimonials to the longest one. That bit is working ok. This is the code I'm using but for some reason it keeps center aligning the content to the left-hand side of the margin rather than the center of the page: body .testimonial_slider .slides { width: 80% !important; height: 250px !important; }
  • Fake replied

    Okay so this centers the name of the person but not the quote itself....

    .testimonial_slider blockquote p {
        width: 80% !important;
    }

  •  1,077
    ThemeNectar replied

    Hey Justine!

    Change your snippet to this:

    .testimonial_slider .slides { 
       width: 80%!important; 
       margin: 0 auto!important;
    }

    Cheers :)

  • Fake replied

    Thanks ThemeNectar!

    I'm also wanting to fix the height of the testimonial slider quote to the height of the largest one. Keeping the names in the same position.

    This works but I'm using pixels at the moment and want it to be responsive. Is there anyway to force the height to say 100% of the longest quote? 

    This is what I have at the moment:

    .testimonial_slider blockquote p {
        height: 200px !important;
    }

    Thanks for your help

    Justine :0)

  •  1,077
    ThemeNectar replied

    Hey again Justine!

    The only way to do this with css would be to set the height correctly in each viewport i.e. desktop, ipad and phone - there's no easier way around this other than creating a custom javascript function to find the height of the tallest quote and set it that way.

    Cheers :)

  • Fake replied

    Thanks again for the quick response! I was thinking this might be more involved.

    I'll see if my limited knowledge can get it working. 

    Cheers Justine :0)