[英]html sidebar won't collapse between 767px and 785px,how do i fix it?
I'm using ADMINLTE to build a website and have a page that it sidebar won't collapse between 767 pixel and 785 pixel other pages have no problem, so i inspect my page and compare the working page shows the below classes我正在使用 ADMINLTE 建立一个网站,并且有一个页面,它的侧边栏不会在 767 像素和 785 像素之间折叠其他页面没有问题,所以我检查我的页面并比较工作页面显示以下类
class='skin-blue sidebar-mini sidebar-collapse'
and class='skin-blue sidebar-mini'
class='skin-blue sidebar-mini sidebar-collapse'
和class='skin-blue sidebar-mini'
and the problem page is 'skin-blue sidebar-mini sidebar-open' and 'skin-blue sidebar-mini'问题页面是“skin-blue sidebar-mini sidebar-open”和“skin-blue sidebar-mini”
and i check this is the part causes the issues when the iterate more than 4我检查这是迭代超过 4 次时导致问题的部分
for ($x = 0; $x <= 4; $x++){
?>
<div class="col-lg-2 col-md-3 col-xs-6">
<form method="post">
<div style="border:1px solid #3c8dbc; background-color:#f1f1f1; border-radius:5px; padding:4px 4px; margin-top:10px; margin-right:-11px; margin-left:-11px;" align="center" onClick="document.forms[''].submit();" >
<img class="menu_m_img" src="dist/img/<?php echo $row["name"]; ?>" /><br />
<h4 class="text-info" style="font-size:12px;"><?php echo mb_strimwidth($row["name"], 0, 18, "...");?></h4>
<h4 class="text-danger">RM<?php echo $row["name_id"]; ?></h4>
<input type="submit" name="add_to_cart" style="border:none; color:#fff; border-radius:5px;
background-repeat:no-repeat; width:100%" value="Add to Cart" class="btn btn-primary" />
</div>
</form>
</div>
<?php
}
}else{?>
<table class="table table-condensed" id="table" style ="margin-top:10px;">
<td colspan="4" align="center">No results found</td>
</table>
<?php
}
?>
why is this happens and how do i solve this?为什么会发生这种情况,我该如何解决? and may i know how it change the class when i press the button, how it add collapse or -open at class?
我可以知道当我按下按钮时它如何改变 class,它如何在 class 添加折叠或打开?
If you have sidebar-open
as body class, it means you pressed the button and want the sidebar to be open.如果您将
sidebar-open
为主体 class,则表示您按下了按钮并希望侧边栏打开。 I don't know how you got it there.我不知道你是怎么弄到那里的。 You con programatically remove it with
$('body').removeClass('sidebar-open');
您可以使用
$('body').removeClass('sidebar-open');
以编程方式将其删除. .
tried at other machine, problem not recreated, it only occur in my devices, so for those have this problem try at others devices first...在其他机器上试过,问题没有重现,它只发生在我的设备上,所以对于那些有这个问题的人先在其他设备上尝试......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.