Support » How-To and Troubleshooting » [Resolved] Unwanted break tag inserted before form input

[Resolved] Unwanted break tag inserted before form input

  • I have text and a form input on the same line in my code, but when a browser renders the page, there is a <br /> tag inserted before the <input> part of the form. I want to get rid of the break.

    My code (which is within a form):
    <td>Amount: <input name=”a3″ size=”7″ type=”textfield” /></td>

    Source code rendered in a browser:
    <td>Amount: <br />
    <input name=”a3″ size=”7″ type=”textfield” /></td>

    Why is the break tag popping in there?

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi
    Forum Moderator


    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.


    It’s the 2nd PayPal form (monthly support) and I want the input box on the same line as “Amount”.

    Here is my code for the form:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Forum Moderator


    Either remove the line break between the Amount and the text input. Or apply a class to the form so it can be styled effectively.

    I *don’t have* a line break between the amount and text input. It’s being auto-inserted. I tried to post my code but I see it was moderated out. I’ll try posting just that single line:
    <tr><td>Amount: <input name="a3" size="7" type="textfield" /></td></tr>

    And my whole form code here:

    You can see I don’t have any break in my code, so why is the browser putting a break in there? Fwiw, I didn’t notice this problem until I upgraded to the latest wp. (Although there is a chance I just didn’t see it before.)

    Can you point me to info on how to apply a class to a form?

    Forum Moderator


    <form class="paypal2" action="https://www.paypal.com/cgi-bin/webscr" method="post">

    Thanks – I changed my form code but I’m not sure how to add the class to the stylesheet. I can edit the stylesheet, but don’t know what to put in there to make sure the break isn’t auto-inserted before the <input> field. I am really a beginner with css.

    Forum Moderator


    form.paypal2 br {display:none;}

    Thank you Esmi, that works 🙂



    Thank you as well.
    I’ve been struggling with this as well and this morning I discovered the
    tags being added. Thanks for the simple solution and you taught me a new trick with css 😀

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Unwanted break tag inserted before form input’ is closed to new replies.