HTML Form How to - Create Horizontal Layout for select








Question

We would like to know how to create Horizontal Layout for select.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
select {<!--  ww w .j  a v a 2  s. c  o  m-->
  display: inline-block;
  margin-left: 12px;
  width: 40px;
}
</style>
</head>
<body>
  Label:
  <select>....</select> Label:
  <select>....
  </select> Label:
  <select>....
  </select>
</body>
</html>

The code above is rendered as follows: