<!DOCTYPE HTML> <!-- This relies on the precise widget etc values. Feel free to adjust this as needed as long as the bug itself doesn't regress. font-size: 0 and vertical-align: top avoids depending on font metrics --> <div style="width: 316px; height: 6px; position: absolute; left: 200px; border-radius: 2px; background-color: red; z-index:-1"></div> <input style="width: 300px; font-size: 0; vertical-align: top"></input>