• even in the page

    the label and input field are on the same line it addes a < br /> after the label

    is there anyway to stop this ?

    ie

    < label >< input > all on same line

    wordpress does it like this < label >< br />< input >

Viewing 5 replies - 1 through 5 (of 5 total)
  • I am having a problem with this as well. I try to enter a code with a $ <input> and it automatically puts the input on the next line. Anyone know of any solution to this?

    I was having the same problem. It looks like the bug will be fixed in version 2.4. It’s a one-line patch, so you may be able to manually add it to your current installation.

    If you don’t want to muck around with your source code, an easier fix is to put the label and input on consecutive lines, rather than the same line, like so:

    <label>...</label>
    <input ... />

    As described in a different bug, no <br/> will be added and they will appear on the same line in your web page (the line-break is treated as whitespace in the browser).

    Beware: the patch and the workaround may end up canceling each other out, resulting in a line-break reappearing if you ever install 2.4! I really don’t know.

    Here is an option that works for me – Go into “code” view for your post, then give your form an id, like <form id=”your_form_id” … and then in your theme .css file add this css style:

    #your_form_id br { display:none;}

    It is perhaps less covenient because you have to give each form the id manually, but involves no patches (plus, I couldn’t get the line break fix described here to work for me).

    Just FYI… I tested both doug’s <label> method and amoswright’s ID method.

    doug’s works in FF (v2.0.0.12), but not in IE6 (v6.0.2900).

    (IE6 adds a phantom </p> tag where the <br> used to be – making the problem worse.)

    amoswright’s works in IE 6, but not in FF.

    Both techniques together (with a little twist) yield success.

    doug’s <label> method: (thanks doug)

    put the label and input on consecutive lines, rather than the same line, like so:

    <label>…</label>
    <input … />

    amoswright’s UPDATED ID method:(thanks amoswright)

    #your_form_id p { display:none; }

    NOTICE THE “P” INSTEAD OF THE “BR”.

    Thanks again guys!

    Just got driven mad not solving this in 2.5.1, but found this post and had to use the –

    Text and Input on consecutive lines method and plus the p display:none to get both browsers conforming.

    All sweet now, but it the evil bug is still there obviously.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP auto adds <br> with form fields on same line’ is closed to new replies.