Thursday, April 21, 2011

Equal width to select input and text input

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Equal width to select input and text input</title>

<style type="text/css">
.page{
margin: 0 auto;
width: 400px;
padding: 20px;
border: 2px solid #abc;
}

input, select{
width: 200px;
margin: 0 0 10px 0;

box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;

}

</style>

</head>

<body>

<div class="page">

<input type="text" value="textbox" />

<select>
<option>Please choose</option>
<option>Please choose Me</option>
</select>

</div>

</body>

</html>

1 comment: