Click here to Skip to main content
16,023,339 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
<style>
#text-position {
   position: absolute;
   bottom: 350px;
   text-align: center;
   width: 30%;

}
</style>
<div id="text-position">Enter Service Number</div><br>
<form>
<input type="text" align="left">
</form>


What I have tried:

<style>
#text-position {
position: absolute;
bottom: 350px;
text-align: center;
width: 30%;

}
</style>
Enter Service Number


<form>
<input type="text" align="left">
</form>
Posted
Updated 22-Mar-16 3:42am

I have been constrained to absolute positioning almost all of the controls on HTML screen (more correctly, php, as they're generated server-side).
HTML
<style type="text/css">
 .textentry {
    positions  absolute;
    top:       50px;  /* I usually locate relative to top  */
    left:      100px; /* left corner of container (screen) */
    height:    80px;  /*  often useful to keep screen orderly */
  }
  <form>
    <input type="text" class="textentry" />
  <body>

</body></form></style>br mode="hold" />
Now, one thing about positioning:  there are often rules that you cannot position without being within a positioned entity.  One way to solve this (and it usually is harmless, is <form style='position:absolute;top:0px;left:0px'>  This restriction is generally quite useful - if you use the absolute positioning within a div, for example, locations can be absolute with respect to that div and the div (container) can be anywhere on the screen:  think "console"

<br></br>
 
Share this answer
 
ASP.NET
<form id="form1" runat="server">
       <div>
           <table>
               <tr>
                   <td>Enter Service Number
                   </td>
                   <td>
                       <input type="text" align="left">
                   </td>
               </tr>
           </table>

       </div>
   </form>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900