Jump to content


Photo

Text-align


  • Please log in to reply
3 replies to this topic

#1 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 949 posts

Posted 17 February 2017 - 10:41 AM

Hi, I want to align text within a text input box. Seems this only works within a style"text-align:right" statement but not within the <input> statement.

        <div style="width:450px;height:230px;padding:10px;"> 	
           <div style="width:240px;height:30px;float:left;">
               <div style="width:440px;float:left;">Entry Date:
               <input style="text-align:right;" type="text" size="1" maxlength="2" name="DD_Entry" value="<?=$SE_DD_Entry?>">&nbsp;/&nbsp; 
               <input style="text-align:right;" type="text" size="1" maxlength="2" name="MM_Entry" value="<?=$SE_MM_Entry?>">&nbsp;/&nbsp;
               <input style="text-align:right;" type="text" size="2" maxlength="4" name="YYYY_Entry" value="<?=$SE_YYYY_Entry?>">&nbsp;
               <span style="color:red;"><?=$_SESSION['Error_5']?></span></div>
            </div>       

This doesn't work

            <div style="width:220px;height:30px;float:left;clear:both">Money in:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&pound;
            <input type="text" maxlength="10" size="5" name="MoneyIn" text-align="right" value="<?=$SE_Money_In?>" size="8">
            <span style="color:red;"><?=$_SESSION['Error_6']?></span></div>
    
            <div style="width:220px;height:30px;float:left;clear:both">Money Out:&nbsp;&nbsp;&pound;
            <input type="text" maxlength="10" size="5" name="MoneyOut" text-align="right" value="<?=$SE_Money_Out?>" size="8">
            <span style="color:red;"><?=$_SESSION['Error_7']?></span></div>     



#2 requinix

requinix
  • Administrators
  • Confusing Administrator
  • 8,203 posts
  • LocationWA

Posted 17 February 2017 - 10:44 AM

text-align is CSS. You can't just take a CSS thing and make it an HTML thing.

#3 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 949 posts

Posted 17 February 2017 - 11:30 AM

Ok so there is a solution?



#4 requinix

requinix
  • Administrators
  • Confusing Administrator
  • 8,203 posts
  • LocationWA

Posted 17 February 2017 - 12:21 PM

You already know what the solution is:

Seems this only works within a style"text-align:right"






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users