WordPress.org

Ready to get started?Download WordPress

Forums

Help with dropdown box (3 posts)

  1. mlevenstein
    Member
    Posted 7 years ago #

    Using default theme. I add a dropdown box, and on save WordPress moves it to below the label. I would like it to line up next to the label. What do I need to modify in the theme to make that possible?

    <p >&nbsp;<label for="txtState">State:</label>&nbsp;<select name="state" >
      <option value="AL">Alabama</option>
    	<option value="AK">Alaska</option>
    	<option value="AZ">Arizona</option>
    	<option value="AR">Arkansas</option>
    	<option value="CA">California</option>
    	<option value="CO">Colorado</option>
    
             <option value="WY">Wyoming</option>
    </select></p>
  2. Jeremy Clark
    Moderator
    Posted 7 years ago #

    Without actually seeing where this is going in your template its hard to say if this will work but this should give you the result you want.

    <p >&nbsp;<label for="txtState">State:</label>&nbsp;<span style="display:inline;"><select name="state" >
      <option value="AL">Alabama</option>
    	<option value="AK">Alaska</option>
    	<option value="AZ">Arizona</option>
    	<option value="AR">Arkansas</option>
    	<option value="CA">California</option>
    	<option value="CO">Colorado</option>
    
             <option value="WY">Wyoming</option>
    </select></span></p>
  3. mlevenstein
    Member
    Posted 7 years ago #

    Thanks for your help. I've read up on "display:inline". Was not familiar with that before.

Topic Closed

This topic has been closed to new replies.

About this Topic