Set correct width to input field

The input field now has a fixed width to correspond to the maximum
number of characters it can have.
pull/1/head
Emil Miler 5 years ago
parent a059d274c0
commit 326d05f08a

@ -2,6 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TIMER</title> <title>TIMER</title>
<style> <style>
body { body {
@ -10,14 +11,14 @@
font-size:3em; font-family:monospace; font-size:3em; font-family:monospace;
} }
input { input {
padding:0; border:0; outline:none; background:none; padding:0; border:0; outline:none; background:none;
font-size:inherit; font-family:monospace; width:8em; font-size:inherit; font-family:monospace;
} }
</style> </style>
</head> </head>
<body> <body>
<div> <div>
T &dash; <input type="text" id="time" placeholder="hh : mm : ss"> T &dash; <input type="text" id="time" size="11" placeholder="hh : mm : ss">
</div> </div>
<script> <script>
var input = document.getElementById('time'); var input = document.getElementById('time');

Loading…
Cancel
Save