2014-09-12 207 views
0

下面是完整的身体代码,但它已被分解使用div所以看起来很好,直到我决定证明盒子的一部分,但仍然是新的这个Ijust无法得到它JUSTIFY然而ALIGN = “中心” align = “left” ALIGN = “正确的” 工作正常,我needto进行一些清理工作,并均衡出的部分是:HTML对齐文本框

<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> 

满格:

<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> 

回答

0

设法解决它按以下,使用“DIV ALIGN =”中心”,“以及使用换行符添加盒上方的文本,而不是下一个给他们

<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> 
0

你不能用html,因为它是css规则。

#your_element{ 

text-align: justify; 

}