gpt4 book ai didi

php - Bootstrap 面板未扩展

转载 作者:搜寻专家 更新时间:2023-10-31 21:27:09 25 4
gpt4 key购买 nike

我正在使用 bootstrap 3,我正在制作一个社交网站,这里的代码是显示帖子的面板的一部分。问题是它在切换时显示评论,但评论没有出现在页脚中它正在穿过它...那么我的面板页脚有什么问题或如何扩展面板页脚?

代码如下:

<div class="panel-footer"> 
Like <span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;&nbsp;
<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>

最佳答案

终于得到它是因为 <div class="clearfix"></div>当我在 </div><!--Toggle Ends here--> 之后使用它时它得到了解决

关于php - Bootstrap 面板未扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34401426/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com