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 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)