I am trying to overlay text in a text box with the same text in a div. I managed to get it to work in all browsers, but FireFox (I use 8.0). In FireFox, the text inside the text box is shifted 1px to the left.
Here is my code:
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style> div, textarea { position:absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; font-family: Consolas; font-size: medium; border:none; border-width: 0px; } div {color:red;} textarea {color: blue;} </style></head> <body> <textarea>Stuff</textarea> <div>Stuff</div> </body> </html>
source share