form { input[type='file'] { visibility: hidden; position: absolute; z-index: -1; } } .idcard-bg { width: 20em; height: 13em; border: 1px #ccc solid; border-radius: 1em; position: relative; overflow: hidden; .button { position: absolute; left: 50%; top: 50%; margin-left: -1.6em; margin-top: -1.6em; } img { width: 100%; height: 100%; } }