查找内联样式的来源

时间:2017-05-29 11:25:46

标签: jquery css inline-styles

我的Prestashop页面有问题。每当我调整窗口大小时,我的英雄元素都会有一组内联样式,宽度设置为像素,左边距为边距。我不能用jQuery覆盖它,因为这些样式似乎每次窗口更改时都会重新计算并重新添加。我可以做些什么吗?。

网址为:http://paolaq.com/test/es/

1 个答案:

答案 0 :(得分:2)

在你的global.js文件621. line:

function div_full_width(){
    var $ = jQuery;
    var contn_width = 1170;
    var window_width = $('#index').width();//$(window).width();

    // set container width
    if( window_width >= 1200 ) {
        contn_width = 1170;
    }else if( window_width >= 992 ){
        contn_width = 970;
    }else if( window_width >= 768 ){
        contn_width = 750;
    }else{
        contn_width = window_width;
    }

    $('.div_full_width').each(function(){
        $(this).css({
            //'margin-left': - ($(window).width() - $('#columns').width())/2,
            //'width': $(window).width()
            'margin-left': - (window_width - contn_width)/2,
            'width': window_width
        });
    });
}
相关问题