嗨,我有一个joomla模块“ Tabs GK4”。在后端,您可以设置模块高度。但是我希望模块高度取决于内容。那可能吗?
.gkTabContainer2 { height: 1800px; }
我的网站是bit.ly/1g3Fd7i
有人知道如何解决这个问题吗?
最佳答案
1)首先,您需要找到helper.php文件。
有字符串#96,其中包含:
$document->addStyleDeclaration('#'.$this->config['module_id'].' .gkTabContainer0, #'.$this->config['module_id'].' .gkTabContainer1, #'.$this->config['module_id'].' .gkTabContainer2 { height: '.$this->config['module_height'].'px; }');
删除整个字符串。
这将关闭模块的CSS高度强制。
2)找到CSS文件:style1.css-style6.css。 (总计:6)
在所有文件中找到字符串:
.gkTabItem.active { position: static; left: 0; }
替换为:
.gkTabItem.active { position: relative !important; left: 0; }
3)找到/modules/mod_tabs_gk4/scripts/engine.js
在第67行之后,其中包含:
item.addClass('active');
插入以下代码:
tabs.removeClass('active');
$('.gkTabItem').eq(currentTab).addClass('active');
如果这不起作用,请使用下面的代码
$('.gkTabItem').removeClass('active');
$('.gkTabItem').eq(currentTab).addClass('active');
关于html - 高度取决于joomla中CSS中的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22236610/