你能帮我解决这个问题吗?

时间:2013-12-06 16:06:57

标签: javascript twitter-bootstrap

我的仪表板存在一些问题。我想结合一些文件,没有我的表“Cursos”向下移动并失去它的位置。我想要的是当我滚动“Recursos y actividades”表时,表格保持不变。我正在发布它,因为我编写了仪表板。

这是代码:

<div class="row">
                <div class="col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                                    <div class="icon"><i class="icon20 i-users-5"></i></div>
                                    <h4>Usuarios</h4>
                                    <a href="#" class="minimize"></a>
                        </div> <!-- End .panel-heading -->
                                <div class="panel-body">    
                                    <ul id="myTab" class="nav nav-tabs">
                                        <li><a href="#tabla" data-toggle="tab">Lista de usuarios</a></li>   
                                        <li><a href="#usuarios" data-toggle="tab">Gráfica</a></li>
                                        <li><a href="#managers" data-toggle="tab">Managers</a></li>
                                    </ul>
                                    <div class="tab-content">
                                        <div class="tab-pane fade in active" id="tabla">
                                            <div class="panel-body">
                                                 <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered table-hover" id="dataTable">
                                                    <?php require_once ("mod/dashboard/dashboard-usuarios.php");?>
                                                 </table>
                                                 <?
                                                echo $CFG->mdl_user;
                                                $idresult = mysql_query ("SELECT count(*) from mdl_user");
                                                    if ($idresult==0){
                                                        echo "Sentencia incorrecta llamado a tabla: mdl_user";
                                                    } 
                                                    else{
                                                        $nregistrostotal = mysql_result ($idresult);
                                                        echo "Hay $nregistrostotal usuarios en la plataforma";
                                                        mysql_free_result($idresult);
                                                    }
                                                ?>
                                                <div class="form-group">
                                                    <label class="col-lg-2 control-label" for="animated">Limite de Usuarios</label>
                                                    <div class="col-lg-10">
                                                        <div class="progress progress-striped active tip" title="90%">
                                                            <div class="progress-bar" role="progressbar" style="width: 90%;"></div>
                                                        </div>
                                                    </div>
                                                </div><!-- End .control-group  -->
                                            </div> <!--termina panel-body-->
                                        </div>
                                        <div class="tab-pane fade" id="usuarios">
                                            <div class="panel-body">
                                                <div class="chart-donut" id="usuarios"style="width: 106%; height:240px; padding: 10px; position: relative;"></div>
                                                <br>

                                            </div><!-- End .panel-body -->
                                        </div>

                                        <div class="tab-pane fade" id="managers">
                                            <div class="panel-body">
                                                <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered table-hover" id="dataTable">
                                                    <tbody>
                                                        <tr class="gradeA">
                                                            <td>Luis A.</td>
                                                        </tr>
                                                        <tr class="gradeA">
                                                            <td>Ana B.</td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div><!--termina panel-body-->
                                        </div>
                                    </div>                                                          
                                </div> <!-- Termina el panel-body -->                                                   
                    </div>  <!-- Termina el panel-default -->
                </div>
                <div class="col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="icon"><i class="icon16 i-stats"></i></div> 
                            <h4>Registros</h4>
                            <a href="#" class="minimize"></a>
                        </div><!-- End .panel-heading -->
                            <div class="panel-body">
                                    <ul id="myTab" class="nav nav-tabs">
                                        <li><a href="#hora" data-toggle="tab">Hora</a></li>
                                        <li><a href="#semana" data-toggle="tab">Semana</a></li>
                                        <li><a href="#mes" data-toggle="tab">Mes</a> </li>
                                    </ul>
                                <div class="tab-content">
                                    <div class="tab-pane fade in active" id="hora">
                                        <div class="panel-body">
                                            <div class="chart-bars-ordered" style="width: 100%; height: 150px; margin-top: 3px; padding: 0px; position: relative;"></div>
                                        </div><!-- End .panel-body -->
                                    </div>
                                    <div class="tab-pane fade_1" id="semana">
                                        <div class="panel-body">
                                            <div class="chart-bars-stacked" style="width: 100%; height: 150px; margin-top: 3px; padding: 0px; position: relative;"></div>
                                        </div><!-- End .panel-body -->
                                    </div>
                                    <div class="tab-pane fade_2" id="mes">
                                        <div class="panel-body">
                                            <div class="chart-bars-horizontal" style="width: 100%; height: 150px; margin-top: 3px; padding: 0px; position: relative;"></div>
                                        </div><!-- End .panel-body -->
                                    </div>
                                </div> 
                            </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="icon"><i class="icon20  i-drawer-3"></i></div>
                            <h4>Recursos y actividades</h4>
                            <a href="#" class="minimize"></a>
                        </div><!-- End .panel-heading -->
                        <div class="panel-body center">
                            <?php 
                                require_once("mod/dashboard/dashboard-actividades.php");
                            ?>
                        </div><!-- End .panel-body center--> 
                        <br>                                    
                        <br>
                    </div><!-- End .widget -->
                </div>
            </div>
                    <div class="row">
                        <div class="col-md-5">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <div class="icon"><i class="icon20  i-drawer-3"></i></div>
                                    <h4>Cursos</h4>
                                    <a href="#" class="minimize"></a>
                                </div><!-- End .panel-heading -->
                                <?require_once("mod/dashboard/dashboard-cursos.php");?>
                            </div>                          
                        </div>
                    </div>

1 个答案:

答案 0 :(得分:0)

使用{position:fixed}作为所需表的css。这将相对于浏览器窗口定位表。添加其他适当的样式,使其在向下滚动页面时显示您想要的样子。有关更多信息,请使用http://www.w3schools.com/cssref/playit.asp?filename=playcss_position&preval=fixed

中的css代码