Skip to content

Instantly share code, notes, and snippets.

@geta6
Created August 23, 2012 04:16
Show Gist options
  • Save geta6/3432237 to your computer and use it in GitHub Desktop.
Save geta6/3432237 to your computer and use it in GitHub Desktop.
maximise `input` element according as parent element.
<html>
<head>
<link rel='stylesheet' href='style.css'>
</head>
<body>
<div id='parent'>
<input id='input' type='text'>
</div>
</body>
</html>
#input {
display: block;
padding: 6px 24px;
width: 100%;
height: 24px;
border: none;
background: rgba(255,255,255,0.84);
-webkit-box-sizing: border-box;
-khtml-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
#parent {
margin: 60px auto;
padding: 10px;
width: 480px;
height: 270px;
background: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment