tags:

views:

85

answers:

3

I've been trying to find the bug on my site http://goo.gl/UOCY and can't figure out where the problem comes from, one of the testimonial boxes won't align to the rest of the testimonials boxes, I need help to fix it, I really have no idea of what I'm missing there. Thanks

A: 

seem that not have enough width (decrease 35% to 31%)

if you change it to this

div.testimonial {
float:left;
margin:10px;
width:31%;
}

its work!

Haim Evgi
That will work only for this particular case, not for arbitrary set of testimonials.
Nikita Rybak
+3  A: 

you have two options:

  1. use a fixed height for all the testimonals. I tried 159px and it works and looks ok. Of course that means for any future testimonials that may have a lot more text it will break.
  2. better option: every alternate (even, i.e. 3rd, 5th, 7th etc.) testimonial div, add a class called odd so your div now looks like <div class="testimonial odd"> and then do this in the CSS: .testimonial.odd { clear:left }. note the lack of space between the two classes in the CSS.
Moin Zaman
Thanks @moin,but unfortunately, the second solution is not working for me, it just list everything in one row.
try `clear:both` instead of `clear:left`
Moin Zaman
can you please try it for odd divs as i've shown in my updated answer?
Moin Zaman
A: 

Two solutions come to mind:

Clear every second testimony. You can do this by either adding a class to every second testimony, or with the CSS3 nth-child selector. The code would look something like:

div.testimonial:nth-child(odd), div.testimonial.clear {
    clear: both;
}

Split the testimonials into two columns. Putting them into two different div, each of them floated with 50% width.

Yi Jiang