dsa88885555 2015-12-21 17:40
浏览 8
已采纳

Bootstrap面板没有扩展

I am using bootstrap 3 and I am making a social networking site, this code here is a part of a panel which shows the posts.The problem is it is showing the comments on toggle but the comments are not appearing within the footer it is crossing it...So what is wrong in my or how can I extend the panel footer?

Here's the code:

<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>
  • 写回答

1条回答 默认 最新

  • doutizha7526 2015-12-21 18:55
    关注

    finally got it it was because of the <div class="clearfix"></div> and it got solved when I used it just after </div><!--Toggle Ends here-->

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算