Trailmix
Member
Posted 1 year ago #
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?
Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.
Trailmix
Member
Posted 1 year ago #
http://brazilministry.com/donate/
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]
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.
Trailmix
Member
Posted 1 year ago #
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:
http://pastebin.com/vBp4DGJD
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?
<form class="paypal2" action="https://www.paypal.com/cgi-bin/webscr" method="post">
Trailmix
Member
Posted 1 year ago #
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.
Try:
form.paypal2 br {display:none;}
Trailmix
Member
Posted 1 year ago #
Thank you Esmi, that works :)
bholmes451
Member
Posted 1 month ago #
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 :D