Skip to content

Instantly share code, notes, and snippets.

@maxsei
Created June 3, 2024 16:25
Show Gist options
  • Save maxsei/17a88a1041eea53e979fad2082f0e1d8 to your computer and use it in GitHub Desktop.
Save maxsei/17a88a1041eea53e979fad2082f0e1d8 to your computer and use it in GitHub Desktop.
Remove arrows from number inputs
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<style type="text/css" media="screen">
input.noarrows::-webkit-outer-spin-button,
input.noarrows::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number].noarrows{
-moz-appearance: textfield;
}
</style>
<body>
<input class="noarrows" type="number" name="example" id="example" value="0">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment