Set margin for select inside a table : table margin « Tags « HTML / CSS






Set margin for select inside a table

     


?<!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" dir="ltr" lang="en-US"
  xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title></title>
<style rel="stylesheet" type="text/css">

table td {
  padding: 5px 0 12px 0;
}

.first {
  width: 100px;
}

.first select,.third select {
  width: 85px;
}

.second select {
  margin: 0 15px 0 0;
}

</style>
</head>
<body>
            <table width="239" cellpadding="0" cellspacing="0">
              <tr>
                <td class="first">
                  Arrival Date<br />
                  <select>
                    <option>August</option>
                  </select>
                </td>
                <td class="second"><br />
                  <select class="year">
                    <option>2012</option>
                  </select>
                  <select class="date">
                    <option>15</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td class="first">
                  Nights<br />
                  <select>
                    <option>1</option>
                  </select>
                </td>
                <td class="third">
                  Rooms<br />
                  <select>
                    <option>0</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td class="first">
                  Adults<br />
                  <select>
                    <option>1</option>
                  </select>
                </td>
                <td class="third">
                  Children<br />
                  <select>
                    <option>1</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td colspan="2" class="reset"><a href="#">RESET</a></td>
              </tr>
            </table>

</body>

</html>

   
    
    
    
    
  








Related examples in the same category

1.table margin-top: 15px;
2.table margin-bottom: 25px;
3.table with margins
4.table margin: 0 0 16px;
5.table margin-bottom: 5px;
6.table margin:15px;