input { width: calc(100% - 8px); /* 8px to account for the default padding and border */ } .tag { float: right; margin-left: 1em; font-size: 85%; } input.tag { width: 7em; border: none; }