How to put a not new-lined table after nbsp

Discussion in 'HTML' started by ennio, Sep 17, 2006.

  1. ennio

    ennio Guest

    Hi all.
    I working in a framework that let me programmatically insert html into
    some dynamic pages. I cannot modify the framework in anyway.

    The problem is that i have a situation where there's a &nbsp put by
    the framework before a table of mine

    [something else...] &nbsp <table name=mytable> </table> [something
    else...]

    i want my table not to go on a newline.
    I cannot put anything at all before the &nbsp, but i can put whatever
    i want after it.
    How can i accomplish that?
    thanks
     
    ennio, Sep 17, 2006
    #1
    1. Advertising

  2. ennio wrote:

    > I working in a framework that let me programmatically insert html into
    > some dynamic pages. I cannot modify the framework in anyway.


    Then you should report the problem to the person or organization that is
    responsible for the "framework", whatever it is.

    > The problem is that i have a situation where there's a &nbsp put by
    > the framework before a table of mine


    Well, that's a problem _in the framework_, not in your code. So you should
    first try to have the problem fixed where it is, before considering a
    workaround (which might strike back the day when the real problem is fixed -
    you might e.g. use a trick to reduce an assumed empty vertical space, and
    what happens when the space is not there?).

    > [something else...] &nbsp <table name=mytable> </table> [something
    > else...]
    >
    > i want my table not to go on a newline.


    (BTW, it should be &nbsp; and not &nbsp although the latter is, in this
    context, formally valid in "classic HTML". But of course one should not use
    &nbsp; for vertical spacing in the first place.)

    Huh? Tables are block level elements by default, and you are not supposed to
    try to change this except in rather special circumstances. _How_ should
    things work when a table appears "inline"? URL, please. (You should have
    posted a URL anyway.)

    Besides, &nbsp; does _not_ cause a newline. Its basic meaning is actually
    something completely different: it is meant to _prevent_ line breaks. In
    this context it won't, but neither does it _cause_ a line break.

    Or do you actually mean something completely different, namely removing the
    "empty line" before the table? In that case, you _could_ do tricks like
    <table ... style="margin-top: -1em">
    but don't: they will strike back if the original problem is fixed. (Striking
    back means that the start of the table will overstrike the end of the
    content before it.)

    > I cannot put anything at all before the &nbsp, but i can put whatever
    > i want after it.


    _Somebody_ can and should fix the &nbsp issue.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JSOUL
    Replies:
    3
    Views:
    488
    Barbara de Zoete
    Nov 9, 2005
  2. JMG
    Replies:
    2
    Views:
    502
  3. Nick Large
    Replies:
    11
    Views:
    5,990
    Nick Large
    Nov 12, 2009
  4. Jon Kim
    Replies:
    7
    Views:
    137
    Rob Biedenharn
    Dec 9, 2009
  5. hotkitty

    Parsing CSV and "&nbsp;&nbsp;"

    hotkitty, Oct 9, 2008, in forum: Perl Misc
    Replies:
    9
    Views:
    382
Loading...

Share This Page