0

I have an edited version of quicksand in my website, it shows correctly on all browsers or at least chrome opera and firefox. However, on IE I get css problems. when i was using the static version the css showed correctly even on IE , did not change any css just added quicksand effect, but it did mess up the display allthough all the animations work great.. please go to this website http://www.jonathansconstruction.com/galleryie.php the quicksand code is as follow:

$(document).ready(function(){

var items = $('.photo_show figure'),
    itemsByTags = {};

// Looping though all the li items:

items.each(function(i){
    var elem = $(this),
        tags = elem.data('tags').split(',');

    // Adding a data-id attribute. Required by the Quicksand plugin:
    elem.attr('data-id',i);

    $.each(tags,function(key,value){

        // Removing extra whitespace:
        value = $.trim(value);

        if(!(value in itemsByTags)){
            // Create an empty array to hold this item:
            itemsByTags[value] = [];
        }

        // Each item is added to one array per tag:
        itemsByTags[value].push(elem);
    });

});

// Creating the "Everything" option in the menu:
createList('View All',items);

// Looping though the arrays in itemsByTags:
$.each(itemsByTags,function(k,v){
    createList(k,v);
});

$('#gallery_menu nav a').live('click',function(e){
    var link = $(this);

    link.addClass('current').siblings().removeClass('current');

    // Using the Quicksand plugin to animate the li items.
    // It uses data('list') defined by our createList function:

    $('.photo_show').quicksand(link.data('list').find('figure'), function(){

adjustHeight = 'dynamic';
initLytebox();

       });
    e.preventDefault();
});

$('#gallery_menu nav a:first').click();

function createList(text,items){

    // This is a helper function that takes the
    // text of a menu button and array of li items

    // Creating an empty unordered list:
    var figure = $('<figure>',{'class':'hidden'});

    $.each(items,function(){
        // Creating a copy of each li item
        // and adding it to the list:

        $(this).clone().appendTo(figure);
    });

    figure.appendTo('.photo_show');

    // Creating a menu item. The unordered list is added
    // as a data parameter (available via .data('list'):

    var a = $('<a>',{
        html: text,
        href:'#',
        data: {list:figure}
    }).appendTo('#gallery_menu nav');
}
 });

Please go to the URL above and check on IE 7, and other , also I put a screenshow of how it looks like in IE please visit here: http://i49.tinypic.com/25tj2bl.jpg this is how it appears on IE7 and screenshot on other browsers is on the comments of this question : Any Help is appreciated.. I'm new to jquery and its plugins and sometimes the syntax gets me confused...

4

1 回答 1

1

您用于Body 部分line-height太小,这会剪裁标题部分Gallery Pictures中看到的风格化字体文本。

在您的自定义styleie.css文件中更改高度的值,如下所示:

line-height:2.12em

出于某种奇怪的原因,IE 要求它比标准 CSS 文件中使用的相同值更大。如果需要,检查父元素是否影响这些子元素。

编辑:毕竟不需要更改上面的 line-height 。在同一行中有一个错字:

display:inline:block;

将其更改为:

display:inline-block;
于 2012-05-28T08:34:02.397 回答