Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/05/2014, 22:54
Avatar de fullmental
fullmental
 
Fecha de Ingreso: octubre-2004
Ubicación: México DF, Xochimilco
Mensajes: 593
Antigüedad: 19 años, 6 meses
Puntos: 3
Respuesta: Hacer que <li> de altura diferente se alinien

Hace unas semanas estuve buscando cómo hacer lo mismo. lo resolví con JS y Jquery

Para eso hice la siguiente función JS que requiere jquery en tu página:


Código:
function normalizeHeights(arrayToNormalize){
		var maxHeight = -1;
		$(arrayToNormalize).each(function() {
		    if ($(this).height() > maxHeight)
		        maxHeight = $(this).height();
		});
		$(arrayToNormalize).each(function() {
		    $(this).height(maxHeight +10);
		});
	}
En tu caso tendrías lllamar a la función de la siguiente forma:
Código:
$(document).ready(function(){
   normalizeHeights("#work-items li");
});
Espero te sirva, saludos.

Puedes verlo funcionando aqui: http://dinamo.mx/touch