引导面板没有得到扩展
Posted
技术标签:
【中文标题】引导面板没有得到扩展【英文标题】:Bootstrap panel not getting extended 【发布时间】:2016-03-27 20:48:00 【问题描述】:我正在使用 bootstrap 3,并且正在创建一个社交网站,这里的代码是显示帖子的面板的一部分。问题是它在切换时显示 cmets,但 cmets 没有出现在页脚中它正在穿过它...那么我的问题是什么或如何扩展面板页脚?
代码如下:
<div class="panel-footer">
Like <span class="glyphicon glyphicon-thumbs-up"></span>
<a href='javascript:void(0)' onClick="javascript:toggle<?php echo $idp?>()" style="color:black">Comments</a>
<div id='toggleComment<?php echo $idp;?>' style="display:none;">
<form action="" method="POST"><!--FORM COMMENT-->
<div class="form-group">
<div class="rows" >
<div class="col-sm-1" style="padding-right:2px;">
<div class="compic">
<img src="<?php echo $profilepic; ?>" style="width:100%;height:100%;" />
</div>
</div>
<div class="col-sm-11" style="padding-left:3px; padding-bottom:7px">
<textarea class="form-control expandable pull-left" name="comment<?php echo $idp;?>" id="comment" placeholder="Write a comment..." required>
</textarea>
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary pull-right" name="subcom<?php echo $idp;?>"><b>Comment</b></button>
<div class="clearfix"></div>
</div></form>
<div class="rows" >
<?php
$postid=$idp;
$postby=$id;
$postto=$uid;
if(isset($_POST['subcom'.$postid]))
$postbody=$_POST['comment'.$postid];
if($postbody!="")
$res=mysqli_query($con,"INSERT INTO comment VALUES('','$postby','$postto','$postbody','$postid')");
$show=mysqli_query($con,"SELECT * FROM comment WHERE postid='$idp' ORDER by id");
while($show_row=mysqli_fetch_array($show))
$commentbyid=$show_row['cby'];
$combody=$show_row['cbody'];
$cbyquery=mysqli_query($con,"SELECT * FROM user WHERE id='$commentbyid'") or die(mysqli_error($con));
$cby=mysqli_fetch_array($cbyquery);
$cpic=$cby['profpic'];
if ($cpic== "" || !file_exists("userdata/profile_pics/$cpic"))
$cpic = "images/default_pic.jpg";
else
$cpic = "userdata/profile_pics/".$cpic;
$cname=ucfirst(strtolower($cby[1]));
$csname=ucfirst(strtolower($cby[2]));
?>
<div class="col-sm-1" style="padding-right:2px;">
<div class="compic">
<img src="<?php echo $cpic; ?>" style="width:100%;height:100%;" />
</div>
</div>
<div class="col-sm-11" style="padding-left:3px;">
<?php echo $cname." ".$csname;?><br>
<?php echo $combody;?>
</div>
<?php
?></div>
</div><!--Toggle Ends here-->
</div>
【问题讨论】:
不,还是一样 【参考方案1】:终于得到它是因为<div class="clearfix"></div>
,当我在</div><!--Toggle Ends here-->
之后使用它时它得到了解决
【讨论】:
以上是关于引导面板没有得到扩展的主要内容,如果未能解决你的问题,请参考以下文章