No line breaks here, thank you



  • Came accross this in an application left by a former employee. Had to stop working for a moment in disbelief.

    [code]
    <nobr><input type="submit" value="Form"></nobr>[/code]


  • I wonder what that table looked like.

    Col1Col2Col3
    Form
    a11a12a13a14
    a21a22a23a24
    a31a32a33a34
    a41a42a43a44


  • @derula said:

    I wonder what that table looked like.
    heh. Not quite. Nice fake button BTW.

    Looked more or less like a standard table except the rightmost column was a button on every row. The reason she'd chosen to make it TH is that she'd already defined TH in a style section on the page to have a different background color, which she wanted to use behind the button.

    Yeah... I know.



  • The caption "Form" is still strange for a button. Okay, and that the rightmost column is the table's header.


    At least the table was an actual table, not a layout trick.



  •  Maybe at one point in time nobr was defined in the CSS?



  • @derula said:

    The caption "Form" is still strange for a button.
    One of the few things about it that makes sense, actually. When pressed, it populates a printable form with that row's data.

    @derula said:

    Okay, and that the rightmost column is the table's header.
    It had a proper row of real TH's at the top. I was just a misguided use of CSS (and no, NOBR wasn't redefined in CSS anywhere). The main WTF IMO was the NOBR around the button. 'Cause I just can't picture a button split over two lines.

    @derula said:

    At least the table was an actual table, not a layout trick.
    Agreed!

    As near as I can tell, the NOBR is the result of a failed experiment. It looks like at one point the entire form (consisting of the form tags, one hidden field, and the submit button) was inside the TH, which produces a 'blank line' under the button. Maybe she thought NOBR would make that go away, and didn't remove it adter it failed to do anything. (she eventually solved it by moving the FORM tags outside the TR tags -- don't know if this is considered good practice or not; it seems to work with no ill effects though.... I just use display:inline for the issue.)



  • Check out the source for this page at Snopes:  http://www.snopes.com/military/medal.asp


  • Garbage Person

    @BlueKnot said:

    I just use display:inline for the issue.
     

    Thanks for this solution, was just going "WTF!" at a page I'm coding up for this very reason.

     

    TRWTF is that it doesn't do it all the time. 90% of the time, yes - but every few dozen rows, there'll be one that ISN'T rendered with the extra line. At least in Firefox.


Log in to reply