Friday, July 29, 2011

Input type file width problem in IE and Firefox

<input type="file" size="46" style="width: 300px;" />

Note : Width works for Internet Explorer and size works for Firefox.

Friday, July 22, 2011

CSS, jquery alternate row color compatible with IE7 and IE8

CSS
.tableClass{
}
.odd { background-color: blue; }
.even { background-color: white; }

jQuery
$(function() {   
    //
    $('.tableClass tr:even').addClass('even');
    $('.tableClass tr:odd').addClass('odd');
});

jquery to find out max height of <li> (column)

var max = -1;
$(".ulClassName li").each(function() {
var h = $(this).height();
max = h > max ? h : max;
       
$(this).css({'min-height': max});
});
alert(max);