how add vertical line inside texbox using html , css
<input type=text value=first|lastname >
need vertical bar 2 value in 2 different textbox
here's attempt...
it's complete hack, , i'm not sure it's mobile-friendly..
thought putting 2 elements on same row using <span>
element, , using js calculate how 1 object needs moved in order placed on top of other.
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> </head> <body> <span> <input id="movedintome" type="textarea" style="background: #fff;padding-right:1em; display:inline-block;line-height:1.2em" value="bla"/> <input id="tobemovedleft" type="textarea" value="" disabled style="background:black; width:0px; border:none;"/> </span> <script> document.getelementbyid("tobemovedleft").style.marginleft = number(document.getelementbyid("movedintome").offsetwidth) / 2 * (-1) + "px"; </script> </body> </html>
Comments
Post a Comment