• Hi,

    I have an “textbox”, then a dropdown menu, and then a button but can’t get them to stay on the same line, next to each other.

    Here’s a live sample (on a Joomla website) of the same search box: http://www.softdux.com/index.php?option=com_content&task=view&id=35&Itemid=90

    I want to put that Domain Search box on a WordPress website
    The website in question isn’t live at this stage so I can’t give you the URL but can give you some screenshots of the page.

    When looking at the webpage’s code, it seems that a <p> element gets added in between each form element, yet it’s not in the content
    How do I fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you familiar with CSS float?

    Float left is generally used to get things side-by-side each other.

    If you’re not familiar with CSS, you may need the support of a CSS forum like http://csscreator.com/forum

    Thread Starter SoftDux

    (@softdux)

    I don’t think that’s the case here.

    Like I said, WP adds a <p> or <br> element in between each form element, as such:

    <td style="white-space: nowrap;" align="center" valign="middle">
    <form action="http://billing.webhostingzone.co.za/domainchecker.php" enctype="application/x-www-form-urlencoded" method="post"><input type="hidden" name="token" value="d887a93569fc770241d7c4b2a6f61b14d084143a" /> Domain: <input type="text" maxlength="200" name="domain" size="20" />
    <select name="ext">
    <option>.co.za</option>
    <option>.org.za</option>
    <option>.com</option>
    <option>.net</option>
    <option>.org</option>
    <option>.info</option>
    <option>.biz</option>
    <option>.mobi</option>
    <option>.us</option>
    <option>.me</option>
    <option>.cc</option>
    <option>.name</option>
    <option>.tv</option>
    <option>.za.com</option>
    <option>.tel</option>
    </select>
    <p><input type="submit" maxlength="2147483647" size="20" value="Go" /></form>
    </td>

    Yet, when I edit the content, those elements aren’t there:

    <td style="white-space: nowrap;" align="center" valign="middle"><form action="http://billing.webhostingzone.co.za/domainchecker.php" enctype="application/x-www-form-urlencoded" method="post"><input type="hidden" name="token" value="d887a93569fc770241d7c4b2a6f61b14d084143a" /> Domain: <input type="text" maxlength="200" name="domain" size="20" /><select name="ext"><option>.co.za</option><option>.org.za</option><option>.com</option><option>.net</option><option>.org</option><option>.info</option><option>.biz</option><option>.mobi</option><option>.us</option><option>.me</option><option>.cc</option><option>.name</option><option>.tv</option><option>.za.com</option><option>.tel</option></select><input type="submit" maxlength="2147483647" size="20" value="Go" /></form></td>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘put form elements on same line?’ is closed to new replies.