HTML来证明文本框的合理性

时间:2014-09-12 21:29:48

标签: html5 textbox alignment

下面是完整的正文代码,但是它已经使用div进行了细分,所以所有看起来都很好,直到我已经决定为这些方框辩护,但仍然是新的Ijust无法让它证明是正确的但是对齐=& #34;中心" ALIGN ="左" ALIGN ="右"工作正常我需要整理和平衡的部分是:

<div align="justify">  Street Number: 
            <input name="xfg" type="text" disabled id="Strn" value="" readonly>
            <br>
            Street Name: <input type="text" disabled id="Strna" readonly><br>
            Suburb: 
            <input type="text" disabled id="Subu" readonly><br>
            Town: <input type="text" disabled id="Town" readonly><br>
            Code: <input type="text" disabled id="Code1" readonly><br>
            Region: <input type="text" disabled id="Region" readonly><br>
            Country: <input type="text" disabled id="Country" readonly ><br></div>

完整的div:

<body bgcolor="#000000" text="#FFFFFF">

  <div id="container" style="width:1000px">
      <div id="header" style="margin-bottom:0;left:50%;">
        <div align="center"><img src="Logo.png" align="middle"></div>
      </div>

        <div id="menu" style="width:50%; height:410px; float:left">
          <div align="center">
            <input type="button" value="Get Address" onclick="codeLatLng()">
            <input type="button" value="reset" onclick="reset()">
            <input type="button" value="Get GPS" onclick="codeAddress()"><br>
            GPS:  <input id="latlng" type="text" value="-00.000000, 00.000000">
            Address:                
            <input id="pladd" type="text" value="">
            <br>
          <div align="justify">  Street Number: 
            <input name="xfg" type="text" disabled id="Strn" value="" readonly>
            <br>
            Street Name: <input type="text" disabled id="Strna" readonly><br>
            Suburb: 
            <input type="text" disabled id="Subu" readonly><br>
            Town: <input type="text" disabled id="Town" readonly><br>
            Code: <input type="text" disabled id="Code1" readonly><br>
            Region: <input type="text" disabled id="Region" readonly><br>
            Country: <input type="text" disabled id="Country" readonly ><br></div>
            Full Address: <br>
            <textarea cols="30" rows="7" readonly id="fulla"></textarea>
            <br>
          </div>


        </div>
        <div id="aside" style="width:50%;height:410px;position:right"> </div>
    </div>
    <div id="footer" style="width:1000px;clear:both;text-align:center;"">
    This is a WIP project, Some functions does not work 100% as yet and may be subject to change
    </div>
    </body>

2 个答案:

答案 0 :(得分:0)

您无法通过 html 撰写,因为它是 css 规则。

#your_element{

 text-align: justify;

}

答案 1 :(得分:0)

使用“div align =”center“”管理修复它,以及使用换行符添加框上方的文本而不是旁边的文本

 <div id="Menu" style="width:25%; height:550px; Float:left;">
      <div align="center">
        <input type="button" value="Get Address" onclick="codeLatLng()">
        <input type="button" value="reset" onclick="reset()">
        <input type="button" value="Get GPS" onclick="codeAddress()"><br>
    <font>    <font1> * </font1> GPS: (decimal degree) </font> <br><input id="latlng" type="text" value=""><br>
    <font>   Address:</font><br><input id="pladd" type="text" value="">
        <br>
      <div id="ressults1" style="text-align:center" >  
     <font> Street Number:</font><br><input name="xfg" type="text" disabled id="Strn" value="" readonly>
        <br>
      <font>  Street Name:</font> <br><input type="text" disabled id="Strna" readonly><br>
      <font>  Suburb:</font> <br>
        <input type="text" disabled id="Subu" readonly><br>
        <font>Town:</font> <br><input type="text" disabled id="Town" readonly><br>
     <font>   Code: </font><br><input type="text" disabled id="Code1" readonly><br>
     <font>   Region: </font><br><input type="text" disabled id="Region" readonly><br>
     <font>   Country: </font><br><input type="text" disabled id="Country" readonly ><br>
     <font> Full Address: <br></font>
        <textarea cols="30" rows="7" readonly id="fulla"></textarea></div>