title: How to make Struts radio tag create a vertical list of radio buttons
body: <p>I'm using a struts radio tag that is being populated with a list of objects that have two fields:</p>
  
  <pre><code>class MyAction {
       List&lt;MyObject&gt; myList;
       String selectedId
       public String execute() {
           ...
           myList = new ArrayList&lt;MyObject&gt;();
           myList.add(new MyObject("1","first object");
           myList.add(new MyObject("2","second object");
           myList.add(new MyObject("3","second object");
           ...
       }
  
       // Getters and Setters for myList &amp; selectedId
       ...
  }
  
  class MyObject {
      String id;
      String name;
  
      MyObject(String id, String name) {
           this.id = id;
           this.name = name;
      }
      // Getters and Setters for id &amp; name
      ...
  }
  </code></pre>
  
  <p>Here's what I was using on my page to display the list of radio buttons   </p>
  
  <pre><code>&lt;s:radio key="selectedId" list="myList" listKey="id" listValue="name"/&gt;
  </code></pre>
  
  <p>However, this yields a horizontal list of radio buttons. I tried adding a css style to them:</p>
  
  <pre><code>&lt;style&gt;
      .vertical input { display: block; }
  &lt;/style&gt;
  </code></pre>
  
  <p>But this causes the labels and the radio buttons to show up on separate lines as well, instead of the radio button and label on the same line:</p>
  
  <blockquote>
  <li></li>
  first object
  <li></li>
  second object  
  <li></li>
  third object
  </blockquote>
  
  <p>what I want is:</p>
  
  <blockquote>
  <li> first object</li>
  <li> second object</li>
  <li> third object</li>
  </blockquote>