Left and right aligned text inside input element - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input text

Description

Left and right aligned text inside input element

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Input text left and right</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#subgroup-input-supply span{
   position: absolute;
   margin-left: 2px;
   margin-top: 1px;
}
#input-supply{<!--from  w  w  w. ja  v a  2 s . c o  m-->
   text-align: right;
}
#subgroup-input-supply {
   position: relative;
}


      </style> 
 </head> 
 <body> 
  <div id="subgroup-input-supply"> 
   <span>Supply:</span> 
   <input id="input-supply" type="text" value="100%" readonly> 
  </div>  
 </body>
</html>

Related Tutorials