Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
标签不希望使用php居中_Php_Html_Css - Fatal编程技术网

标签不希望使用php居中

标签不希望使用php居中,php,html,css,Php,Html,Css,我是php新手,对于我提出的这个微不足道的问题,我深表歉意。我似乎无法使标签居中对齐。从附件中可以看到,只有文本框居中。请你给我指一下正确的方向好吗 这是密码。如你所见,我在表格的开头和结尾使用中心 echo" <center> <fieldset> <div class=\"form-horizontal\"> <h7 class=\"label\"><font color=\"#FF00

我是php新手,对于我提出的这个微不足道的问题,我深表歉意。我似乎无法使标签居中对齐。从附件中可以看到,只有文本框居中。请你给我指一下正确的方向好吗

这是密码。如你所见,我在表格的开头和结尾使用中心

echo"   <center>    <fieldset>
        <div class=\"form-horizontal\">
             <h7 class=\"label\"><font color=\"#FF0000\" size=\"+1\"><strong>* </strong></font>: Required Fields</h7> <br><br>
            <div class=\"form-row\">
            <div class=\"form-label\">First Name <font color=\"#FF0000\" size=\"+1\">*</font><em></em></div>
                <div class=\"form-controls\">
                   <input id=\"First Name\" type=\"text\" name=\"FirstName\" value=\"$firstname\">       
                </div>
                </div>

                <div class=\"form-row\">
                <div class=\"form-label\">Last Name <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                    <input id=\"Last Name\" type=\"text\" name=\"LastName\" value=\"$LastName\">      
                </div>
                </div>

                <div class=\"form-row\">
                <div class=\"form-label\">ID Number <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                  <input name=\"IDNumber\" type=\"text\" id=\"ID Number\" value=\"$IdentityNumber\" maxlength=\"13\">       
                </div>
                </div>

                <div class=\"form-row\">
                <div class=\"form-label\">Email Address</em></div>
                <div class=\"form-controls\">
                   <input id=\"Email Address\" type=\"text\" name=\"EmailAddress\" value=\"$ParentEmailAddress\">             
                </div>
                </div>


                <div class=\"form-row\">
                <div class=\"form-label\">Mobile Number <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                     <input name=\"MobileNumber\" type=\"text\" id=\"Mobile Number\" value=\"$ParentMobileNo\" maxlength=\"10\">         
                </div>
                </div>

                <div class=\"form-row\">
                <div class=\"form-label\">Date of Registration <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                    <input id=\"Date of Registration\" type=\"text\" name=\"DateofRegistration\" value=\"$DateOfRegistration\">      
                </div>
                </div>


                <div class=\"form-row\">
                <div class=\"form-label\">Learners Full Name <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                   <input id=\"Learners Full Name\" type=\"text\" name=\"LearnersFullName\" value=\"$LearnerFullName\">       
                </div>
                </div>

                <div class=\"form-row\">
                <div class=\"form-label\">Learners Date of Birth <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                   <input id=\"Learners Date of Birth\" type=\"date\" name=\"LearnersDateofBirth\" value=\"$LearnerDOB\">    
                </div>
                </div>

                <div class=\"form-row\">
                <div class=\"form-label\">School Nominated <font color=\"#FF0000\" size=\"+1\">*</font></div>
                <div class=\"form-controls\">
                <select id=\"School Nominated\" type=\"text\" name=\"SchoolNominated\">
                    </center>";
echo”
*:必填字段

名字* 姓* 身份证号码* 电子邮件地址 手机号码* 注册日期* 学习者全名* 出生日期* 学校提名* ";

我已尝试添加一张图片以向您显示表单。请转到此链接查看(.png)

使用CSS而不是PHP来居中文本。以下内容将使所有标签居中

label { text-align: center; }

令人惊讶的是,我们使用HTML+CSS来制作网页样式,而不是PHP。
大约在20年前就被弃用了。@j08691,20年了?真的吗?@j08691啊哈说得很好。你为什么用PHP输出那么多HTML?