Php 更改所有页面元素的位置

Php 更改所有页面元素的位置,php,html,printing,Php,Html,Printing,我有这一页 <?php include("../../config.php"); ?> <!DOCTYPE html> <html> <head> <style> .invoice-info { } .table { } table, th { -

我有这一页

<?php

    include("../../config.php");

?>
<!DOCTYPE html>
<html>
    <head>
        <style>
            .invoice-info {
            }

            .table {
            }

            table, th {
                -webkit-print-color-adjust: exact;
            }

            table, th, td {
                border: 1px solid black;
            }

            @media print {
                @page {
                    margin: 20px;
                }
            }

            body {
                margin: 5.6cm;
            }

            .invoice {
                border-style: solid;
                border-width: 50px;
                border-color: #FFFFFF;
                height: 100%;
                width: 80%;
                overflow: visible;
            }

            .footer {
                float: none;
            }

            .left-footer {
                float: left;
                padding-left: 100px;
                padding-top: 200px;
                text-align: center;
                font-weight: 700;
                font-size: 18px;
            }

            .right-footer {
                float: right;
                padding-top: 200px;
                margin-right: -50px;
                text-align: center;
                font-weight: 700;
                font-size: 18px;
            }

            .note-footer {
                float: inherit;
                padding-top: 20%;
                width: 100%;
            }
        </style>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Student Result Card</title>
        <!-- Tell the browser to be responsive to screen width -->
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <!-- Bootstrap 3.3.6 -->
        <link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css">
        <!-- Font Awesome -->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
        <!-- Ionicons -->

    </head>
    <body class="hold-transition skin-blue sidebar-mini">
        <div class="wrapper">

            <!-- Logo -->
            <?php include("header.php");
            ?>

            some text

            <div class="pad margin no-print">
                <div class="callout callout-info" style="margin-bottom: 0!important; text-align:center;">
                    <h2><?php echo $depname; ?></h2>
                </div>
            </div>
            <div class="mypage">
                <!-- Main content -->
                <section class="invoice">
                    <?php
                        $query1 = mysqli_query($con,"SELECT student.Result1,student.StudentName,student.DepartmentID,model.ModelID,model.modelname,model.modelcode,grades.StudentID from grades INNER JOIN student ON grades.StudentID = student.StudentID INNER JOIN model ON grades.ModelID = model.ModelID Where DepartmentID='".$dep."' GROUP BY StudentID");
                        while($row = mysqli_fetch_array($query1))
                        {
                    ?>
                    <!-- title row -->
                    <div class="row">

                        <!-- /.col -->
                    </div>
                    <!-- info row -->
                    <div class="row invoice-info">
                        <div class="col-sm-4 invoice-col">
                            <address>
                                <strong>
                                    some text
                                </strong>
                            </address>
                        </div>
                        <!-- /.col -->
                        <div class="col-sm-4 invoice-col">
                            <some text
                        </div>
                        <!-- /.col -->
                        <div class="col-sm-4 invoice-col">

                            <img src="logo.png" style="padding-top:-10px;
            width:230px;height:150px">
                        </div>
                        <!-- /.col -->
                    </div>
                    <!-- /.row -->
                    <!-- Table row -->
                    <div class="row" style="margin-top:50px;">
                        <div class="col-xs-12 table-responsive">

                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th width="250px">Student Name</th>
                                        <th style="text-align: center">
                                            <?php echo $row["StudentName"]; ?>
                                        </th>
                                    </tr>
                                </thead>
                            </table>

                            <table class="table table-striped">
                                <tr>
                                    <th style="background-color: #80aaff !important;color:white
                  !important;text-align: center;">#</th>
                                    <th style="background-color: #80aaff !important;color:white
                      !important;;text-align: center;">Subject Name</th>
                                    <th style="background-color: #80aaff !important;
        color: white !important;text-align: center;">Grade</th>

                                </tr>
                                <tbody>
                                    <?php
                                        $order=0;
                                        $query2 = mysqli_query($con,"SELECT student.Result1,grades.Total1_After_Curve,grades.Total1,grades.ModelID,model.modelname,model.modelcode from grades INNER JOIN student ON grades.StudentID = student.StudentID INNER JOIN model ON grades.ModelID = model.ModelID Where DepartmentName='".$depname."' group by modelid");
                                        while($row2 = mysqli_fetch_array($query2))
                                        {
                                            $order++;

                                    ?>
                                    <tr>
                                        <td style="text-align: center;"><?php echo $order; ?></td>
                                        <td style="text-align: center;">
                                            <?php echo $row2["modelname"]; ?>
                                        </td>

                                        <?php

                                            if($row2["Total1"] >= 50)
                                            {
                                                echo '
                                                <td style="text-align: center;">Pass</td>';
                                            }
                                            else
                                            {
                                                echo '
                                                <td style="text-align: center;">Fail</td>';
                                            }
                                        ?>

                                    </tr>

                                    <?php } ?>

                                </tbody>
                                <tfooter>
                                    <?php
                                    if($row["Result1"] == "0")
                                    {


                                    echo '

                                    <td style="text-align:center;" colspan="2">
                                        <h4>
                                            <strong>RESULT</strong>
                                        </h4>
                                    </td>
                                    <td style="text-align:center;">
                                        <h4><strong>Fail</strong></h4>
                                    </td>

                                    ';
                                    }
                                    else
                                    {
                                    echo '

                                    <td style="text-align:center;" colspan="2">
                                        <h4>
                                            <strong>RESULT</strong>
                                        </h4>
                                    </td>
                                    <td style="text-align:center;">
                                        <h4><strong>Pass</strong></h4>
                                    </td>

                                    ';
                                    }?>

                                </tfooter>
                            </table>
                        </div>
                        <!-- /.col -->
                    </div>
                    <!-- /.row -->

                    <div class="row">
                        <!-- accepted payments column -->
                        <!-- /.col -->
                        <div class="col-xs-12">


                            <div class="table-responsive">
                                <div style="float:right; margin-top:-90px; padding-right:100px;">

                                    <div class="left-footer">
                                        <?php echo $_SESSION['login_admin']; ?><br>
                                        some text
                                    </div>
                                    <div class="right-footer">
                                        some text
                                    </div>
                                    <div class="note-footer">
                                        <h3>Note</h3>
                                        <strong>some text</strong>
                                    </div>


                                </div>
                            </div>
                            <!-- /.col -->
                        </div>

                        <div class="row no-print">
                            <div class="col-xs-12">

                                <a href="Report3-print.html" target="_blank" type="button" class="btn
            btn-success pull-right">
                                    <i class="fa fa-credit-card"></i> Print
                                </a>
                                <button type="button" class="btn btn-primary pull-right"
                                        style="margin-right: 5px;">
                                    <i class="fa fa-download"></i> Generate PDF
                                </button>
                            </div>
                        </div>
                        <?php

                        } ?>
                </section>
                <!-- /.content -->
                <div class="clearfix"></div>
            </div>
            <!-- /.content-wrapper -->


            <div class="control-sidebar-bg"></div>
        </div>
    </body>
</html>

.发票信息{
}
.桌子{
}
表,th{
-webkit打印颜色调整:精确;
}
表,th,td{
边框:1px纯黑;
}
@媒体印刷品{
@页面{
利润率:20px;
}
}
身体{
边缘:5.6厘米;
}
.发票{
边框样式:实心;
边框宽度:50px;
边框颜色:#FFFFFF;
身高:100%;
宽度:80%;
溢出:可见;
}
.页脚{
浮动:无;
}
.左脚{
浮动:左;
左侧填充:100px;
填充顶部:200px;
文本对齐:居中;
字号:700;
字号:18px;
}
.右脚{
浮动:对;
填充顶部:200px;
右边距:-50px;
文本对齐:居中;
字号:700;
字号:18px;
}
.注释页脚{
浮动:继承;
垫面:20%;
宽度:100%;
}
学生成绩卡
一些文本
如果你想重复标题

这就是元素的用途。正式文件。

但表格位置已更改。。。。我将用什么来修复??我使用“position:fixed”css属性,但我不能使用其他css格式,比如填充或边距,我使用th和其他技术修复了这个问题