我正在开发一个面临高度自动问题的网站。我的website link,当我点击“Dentists”类别滑动菜单关闭时,您可以在左侧菜单中看到问题页面高度不会自动增加。我的页面保持高度自动仍然无法正常工作。 如果有人有这个解决方案,请尽快告诉我?
这是我正在使用的代码:
<script type='text/javascript' src='js/jquery.cookie.js'></script>
<script type='text/javascript' src='js/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='js/jquery.dcjqaccordion.2.7.min.js'></script>
<script type="text/javascript">
$(document).ready(function($){
$('#accordion-1').dcAccordion({
eventType: 'click',
autoClose: true,
saveState: true,
disableLink: true,
speed: 'slow',
showCount: true,
autoExpand: true,
cookie : 'dcjq-accordion-1',
classExpand : 'dcjq-current-parent'
});
$('#accordion-2').dcAccordion({
eventType: 'click',
autoClose: false,
saveState: true,
disableLink: true,
speed: 'fast',
classActive: 'test',
showCount: true
});
$('#accordion-3').dcAccordion({
eventType: 'click',
autoClose: false,
saveState: false,
disableLink: false,
showCount: false,
speed: 'slow'
});
$('#accordion-4').dcAccordion({
eventType: 'hover',
autoClose: true,
saveState: true,
disableLink: true,
menuClose: false,
speed: 'slow',
showCount: true
});
$('#accordion-5').dcAccordion({
eventType: 'hover',
autoClose: false,
saveState: true,
disableLink: true,
menuClose: true,
speed: 'fast',
showCount: true
});
$('#accordion-6').dcAccordion({
eventType: 'hover',
autoClose: false,
saveState: false,
disableLink: false,
showCount: false,
menuClose: true,
speed: 'slow'
});
});
</script>
<link href="css/skins/graphite.css" rel="stylesheet" type="text/css" />
<?php
/****code for category list in feft menu*******/
$default = array('table' => 'category',
'fields' => '*',
'order' => 'CategoryId',
'sort' => 'ASC',
'limit' => "999999");
$arryfirst=$CommonObj->select($default);
?>
<div id="whole_category1">
<div class="graphite demo-container">
<ul class="accordion" id="accordion-1">
<?php if(!empty($arryfirst))
{
foreach($arryfirst as $row1)
{
$catid = $row1['category']['CategoryId'];
$actname = $row1['category']['Category'];
?>
<li><a href="ProductHome.php?catid=<?php echo $catid; ?>"><?php echo $actname ; ?></a>
<ul>
<?php $default2 = array('table' => 'subcategory',
'fields' => '*',
'condition' => "CategoryId='$catid'",
'order' => 'CategoryId',
'limit' => "999999");
$arry2=$CommonObj->select($default2);
if(!empty($arry2))
{
foreach($arry2 as $row2)
{
$sbcatid = $row2['subcategory']['SubCategoryId'];
$sbctname = $row2['subcategory']['SubCategoryName'];
?>
<li ><a style="padding-bottom: 6px;padding-top: 5px;" href="ProductHome.php?sbcatid=<?php echo $sbcatid; ?>"> <?php echo $sbctname; ?></a></li>
<?php } } ?>
</ul></li>
<?php }
} ?>
</ul>
</div>
<!-- <div class="sidebg2"></div>-->
</div>
答案 0 :(得分:3)
从.demo-container
中删除height属性答案 1 :(得分:1)
答案 2 :(得分:0)
只需删除.demo-container中的高度
.demo-container { 身高:700px; //删除它 }