Table not lining up next to text

Discussion in 'HTML' started by tshad, Apr 2, 2005.

  1. tshad

    tshad Guest

    How do I get a table to line up next to my text in the same cell (I know a
    table in a table is not a good thing - this is how MS does it with their
    asp:radiobuttonlist objects)

    I am trying to get the radio buttons next to my text and not below it.

    I have a sample that shows the problem -
    http://www.payrollworkshop.com/samples/tableAlign.htm.

    The code is:

    ******************************************************
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>

    <body>
    <table width="309" height="117" border="1" cellpadding="0" cellspacing="0">
    <tr>
    <td width="180" height="76" style="vertical-align:top" nowrap>this is a
    test
    <table width="99" border="1" cellspacing="0" cellpadding="0">
    <tr>
    <td width="53">&nbsp;</td>
    <td width="46">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table>
    </body>
    </html>
    *************************************************************

    I just want to get the table up next to the text "this is a test".

    Thanks,

    Tom
    tshad, Apr 2, 2005
    #1
    1. Advertising

  2. tshad wrote:

    > How do I get a table to line up next to my text in the same cell (I know a
    > table in a table is not a good thing - this is how MS does it with their
    > asp:radiobuttonlist objects)
    >
    > I am trying to get the radio buttons next to my text and not below it.
    >
    > I have a sample that shows the problem -
    > http://www.payrollworkshop.com/samples/tableAlign.htm.
    >
    > The code is:
    >
    > ******************************************************
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    > <title>Untitled Document</title>
    > </head>
    >
    > <body>
    > <table width="309" height="117" border="1" cellpadding="0"
    > cellspacing="0">
    > <tr>
    > <td width="180" height="76" style="vertical-align:top" nowrap>this is
    > a
    > test
    > <table width="99" border="1" cellspacing="0" cellpadding="0">
    > <tr>
    > <td width="53">&nbsp;</td>
    > <td width="46">&nbsp;</td>
    > </tr>
    > </table>
    > </td>
    > </tr>
    > <tr>
    > <td>&nbsp;</td>
    > </tr>
    > </table>
    > </body>
    > </html>
    > *************************************************************
    >
    > I just want to get the table up next to the text "this is a test".
    >
    > Thanks,
    >
    > Tom


    Use a 3-column table within. A table cannot be placed in-line with other
    elements. For example, you cannot have 2 tables rooted in the same line as
    a linebreak will be forced. More ideally, kill tables and start using divs.

    Roy

    --
    Roy S. Schestowitz
    http://Schestowitz.com
    Roy Schestowitz, Apr 2, 2005
    #2
    1. Advertising

  3. "tshad" <> wrote:

    > How do I get a table to line up next to my text in the same cell


    Meaning what? I have a vague idea of what "line up next to" might mean,
    but I'm afraid that even people with some variant of English as their
    native language might interpret the statement in different ways.

    > (I know a table in a table is not a good thing


    It rarely is. It activates bugs, and usually at least one of the tables
    is not really tabular data.

    >- this is how MS does
    > it with their asp:radiobuttonlist objects)


    But why would you be limited by that in HTML?

    > I am trying to get the radio buttons next to my text and not below
    > it.


    That one I can understand, but how does that relate to what you said
    first (or in the Subject line)?

    Are we supposed to guess that the dummy text is in fact a legend for a
    set of radio buttons and the dummy cells is the table are actually
    radio buttons?

    > I have a sample that shows the problem -
    > http://www.payrollworkshop.com/samples/tableAlign.htm.


    Why didn't you include a _real_ sample? Surely there's something
    between revealing the actual data in your payroll and presenting
    pointlessly dummy stuff.

    > The code is:

    - -
    > <title>Untitled Document</title>


    According to Google, myriads of pages have actually been published with
    such a title, by the way. If an authoring tool creates such nonsense,
    the first thing in creating a new page should be to change the title
    text. Even for test pages, since otherwise you learn wrong habits.

    > <table width="309" height="117"


    Stop using pixel dimensions. Actually, don't set any dimension unless
    you know why and how to do it properly.

    > I just want to get the table up next to the text "this is a test".


    I could tell you, but then I would have to tell you why you are doing
    things wrong now.

    For a set of radio buttons, first think whether that's really the best
    approach for setting up a selection interface (see
    http://www.cs.tut.fi/~jkorpela/forms/choices.html )
    and if you _know_ it is, use <fieldset>, with the explanation in
    <legend>, and with each alternative on a line of its own,
    naturally with <label> to indicate the associations.

    After doing that, post the URL and ask about tuning the visual
    appearance, if you think that's a problem you cannot solve
    on your own.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Apr 2, 2005
    #3
  4. Jukka K. Korpela wrote:

    > "tshad" <> wrote:
    >
    >> How do I get a table to line up next to my text in the same cell

    >
    > Meaning what? I have a vague idea of what "line up next to" might mean,
    > but I'm afraid that even people with some variant of English as their
    > native language might interpret the statement in different ways.
    >
    >> (I know a table in a table is not a good thing

    >
    > It rarely is. It activates bugs, and usually at least one of the tables
    > is not really tabular data.
    >
    >>- this is how MS does
    >> it with their asp:radiobuttonlist objects)

    >
    > But why would you be limited by that in HTML?
    >
    >> I am trying to get the radio buttons next to my text and not below
    >> it.

    >
    > That one I can understand, but how does that relate to what you said
    > first (or in the Subject line)?
    >
    > Are we supposed to guess that the dummy text is in fact a legend for a
    > set of radio buttons and the dummy cells is the table are actually
    > radio buttons?
    >
    >> I have a sample that shows the problem -
    >> http://www.payrollworkshop.com/samples/tableAlign.htm.

    >
    > Why didn't you include a _real_ sample? Surely there's something
    > between revealing the actual data in your payroll and presenting
    > pointlessly dummy stuff.
    >
    >> The code is:

    > - -
    >> <title>Untitled Document</title>

    >
    > According to Google, myriads of pages have actually been published with
    > such a title, by the way. If an authoring tool creates such nonsense,
    > the first thing in creating a new page should be to change the title
    > text. Even for test pages, since otherwise you learn wrong habits.
    >
    >> <table width="309" height="117"

    >
    > Stop using pixel dimensions. Actually, don't set any dimension unless
    > you know why and how to do it properly.
    >
    >> I just want to get the table up next to the text "this is a test".

    >
    > I could tell you, but then I would have to tell you why you are doing
    > things wrong now.
    >
    > For a set of radio buttons, first think whether that's really the best
    > approach for setting up a selection interface (see
    > http://www.cs.tut.fi/~jkorpela/forms/choices.html )
    > and if you _know_ it is, use <fieldset>, with the explanation in
    > <legend>, and with each alternative on a line of its own,
    > naturally with <label> to indicate the associations.
    >
    > After doing that, post the URL and ask about tuning the visual
    > appearance, if you think that's a problem you cannot solve
    > on your own.


    Jukka,

    You are the toughest person in alt.html without a doubt. *smile* You know
    your stuff, but be gentle with people whose expertise level differs from
    yours. It is not CSS-D of which I noticed you're a subscriber as well. Help
    them, don't scare them. *smile*

    --
    Roy S. Schestowitz
    http://Schestowitz.com
    Roy Schestowitz, Apr 2, 2005
    #4
  5. tshad

    Toby Inkster Guest

    Roy Schestowitz wrote:

    > Use a 3-column table within. A table cannot be placed in-line with other
    > elements.


    <table style="display:inline-table">...</table>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Apr 2, 2005
    #5
  6. Jukka K. Korpela wrote:
    >><title>Untitled Document</title>

    > According to Google, myriads of pages have actually been published with
    > such a title, by the way. If an authoring tool creates such nonsense,
    > the first thing in creating a new page should be to change the title
    > text. Even for test pages, since otherwise you learn wrong habits.


    You know, this is an excellent (and very often missed) point!


    --
    -=tn=-
    Travis Newbury, Apr 2, 2005
    #6
  7. Roy Schestowitz wrote:
    > Jukka,
    > You are the toughest person in alt.html without a doubt. *smile* You know
    > your stuff, but be gentle with people whose expertise level differs from
    > yours. It is not CSS-D of which I noticed you're a subscriber as well. Help
    > them, don't scare them. *smile*


    Man, I thought it was a very tame (and informative) response.

    --
    -=tn=-
    Travis Newbury, Apr 2, 2005
    #7
  8. Travis Newbury wrote:

    > Roy Schestowitz wrote:
    >> Jukka,
    >> You are the toughest person in alt.html without a doubt. *smile* You know
    >> your stuff, but be gentle with people whose expertise level differs from
    >> yours. It is not CSS-D of which I noticed you're a subscriber as well.
    >> Help them, don't scare them. *smile*

    >
    > Man, I thought it was a very tame (and informative) response.


    It was. Jukka's replies are strong, right to the point, and interesting. I
    was **smiling** to emphasise that it was not criticism.

    Roy

    --
    Roy S. Schestowitz
    http://Schestowitz.com
    Roy Schestowitz, Apr 2, 2005
    #8
  9. Toby Inkster wrote:

    > Roy Schestowitz wrote:
    >
    >> Use a 3-column table within. A table cannot be placed in-line with other
    >> elements.

    >
    > <table style="display:inline-table">...</table>


    I learn something new every day. Thanks.

    --
    Roy S. Schestowitz
    http://Schestowitz.com
    Roy Schestowitz, Apr 2, 2005
    #9
  10. tshad

    Sid Ismail Guest

    On Sat, 02 Apr 2005 00:24:17 GMT, "tshad"
    <> wrote:

    : <body>
    : <table width="309" height="117" border="1" cellpadding="0" cellspacing="0">
    : <tr>
    : <td width="180" height="76" style="vertical-align:top" nowrap>this is a
    : test

    </td>
    <td>

    : <table width="99" border="1" cellspacing="0" cellpadding="0">
    : <tr>


    Sid
    Sid Ismail, Apr 2, 2005
    #10
  11. tshad

    tshad Guest

    "Toby Inkster" <> wrote in message
    news:p...
    > Roy Schestowitz wrote:
    >
    > > Use a 3-column table within. A table cannot be placed in-line with other
    > > elements.

    >
    > <table style="display:inline-table">...</table>


    That doesn't seem to work.

    I tried it on the inner table and then on the outer table with no effect.

    http://www.payrollworkshop.com/samples/tableAlign2.htm

    Thanks,

    Tom
    >
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > Contact Me ~ http://tobyinkster.co.uk/contact
    >
    tshad, Apr 3, 2005
    #11
  12. tshad

    tshad Guest

    "Sid Ismail" <> wrote in message
    news:...
    > On Sat, 02 Apr 2005 00:24:17 GMT, "tshad"
    > <> wrote:
    >
    > : <body>
    > : <table width="309" height="117" border="1" cellpadding="0"

    cellspacing="0">
    > : <tr>
    > : <td width="180" height="76" style="vertical-align:top" nowrap>this

    is a
    > : test
    >
    > </td>
    > <td>
    >
    > : <table width="99" border="1" cellspacing="0" cellpadding="0">
    > : <tr>
    >
    >


    You're right.

    This would probably work, but I was trying to get out of creating another
    table (or cell).

    This is what others have been telling me is a bad thing to do.

    Tom
    > Sid
    >
    >
    tshad, Apr 3, 2005
    #12
  13. tshad

    tshad Guest

    "Jukka K. Korpela" <> wrote in message
    news:Xns962C57AD07916jkorpelacstutfi@193.229.0.31...
    > "tshad" <> wrote:
    >
    > > How do I get a table to line up next to my text in the same cell

    >
    > Meaning what? I have a vague idea of what "line up next to" might mean,
    > but I'm afraid that even people with some variant of English as their
    > native language might interpret the statement in different ways.
    >
    > > (I know a table in a table is not a good thing

    >
    > It rarely is. It activates bugs, and usually at least one of the tables
    > is not really tabular data.
    >
    > >- this is how MS does
    > > it with their asp:radiobuttonlist objects)

    >
    > But why would you be limited by that in HTML?


    Because that is what MS is doing with its asp.net objects.

    My code has a some text with 2 radio buttons (asp:radiobuttonlist) next to
    (not below) the text. The object is rendered as a table. Why MS does this
    I don't know. They could just as easily put 2 radio buttons next to each
    other without a table, but they don't.
    >
    > > I am trying to get the radio buttons next to my text and not below
    > > it.

    >
    > That one I can understand, but how does that relate to what you said
    > first (or in the Subject line)?


    The radio buttons are rendered as a table.

    Here is the actual code I am trying to make work:

    Receive: <asp:RadioButtonList ID="EmailNewJobsFrequency"
    RepeatDirection="Horizontal" style="display:inline-table;" runat="server">
    <asp:ListItem Selected="true" Text="Daily" />
    <asp:ListItem Text="Weekly" />
    </asp:RadioButtonList>

    Here is what it is rendered into from asp.net:

    Receive:<table id="EmailNewJobsFrequency" border="0"
    style="display:inline-table;">
    <tr>
    <td><input id="EmailNewJobsFrequency_0" type="radio"
    name="EmailNewJobsFrequency" value="Daily" checked="checked" /><label
    for="EmailNewJobsFrequency_0">Daily</label></td><td><input
    id="EmailNewJobsFrequency_1" type="radio" name="EmailNewJobsFrequency"
    value="Weekly" /><label for="EmailNewJobsFrequency_1">Weekly</label>
    </td>
    </tr>
    </table>

    The radio buttons are all horizontally next to each other, but below the
    text "Recieve:".

    >
    > Are we supposed to guess that the dummy text is in fact a legend for a
    > set of radio buttons and the dummy cells is the table are actually
    > radio buttons?


    No.

    I was trying to demonstrate the problem with a simple example. The problem
    is not the radio buttons (they would display next to the text fine). The
    problem is the table next to the text (since the radio buttons are rendered
    to a table). If I told you they were buttons, I would not be explaining the
    problem correctly (as they aren't the problem).
    >
    > > I have a sample that shows the problem -
    > > http://www.payrollworkshop.com/samples/tableAlign.htm.

    >
    > Why didn't you include a _real_ sample? Surely there's something
    > between revealing the actual data in your payroll and presenting
    > pointlessly dummy stuff.


    I can't.

    It is asp.net code not html code. I need to show you the problem in html.
    If I can make the html work, I can normally make the asp.net code work. For
    example, if the "style='display:inline-table' had worked in html, it
    probably would have worked in asp.net. If you look at my above example, I
    did add it into the asp.net control and it rendered correctly.

    But if the html won't work, the asp.net won't work either.

    >
    > > The code is:

    > - -
    > > <title>Untitled Document</title>

    >
    > According to Google, myriads of pages have actually been published with
    > such a title, by the way. If an authoring tool creates such nonsense,
    > the first thing in creating a new page should be to change the title
    > text. Even for test pages, since otherwise you learn wrong habits.
    >
    > > <table width="309" height="117"

    >
    > Stop using pixel dimensions. Actually, don't set any dimension unless
    > you know why and how to do it properly.
    >


    I didn't.

    Everyone keeps complaining about this. I didn't do this. DW did. Front
    Page is worse about this. If you take the width and heights out, it puts
    them back when you make changes.

    > > I just want to get the table up next to the text "this is a test".

    >
    > I could tell you, but then I would have to tell you why you are doing
    > things wrong now.
    >
    > For a set of radio buttons, first think whether that's really the best
    > approach for setting up a selection interface (see
    > http://www.cs.tut.fi/~jkorpela/forms/choices.html )
    > and if you _know_ it is, use <fieldset>, with the explanation in
    > <legend>, and with each alternative on a line of its own,
    > naturally with <label> to indicate the associations.
    >


    The selection interface is fine, but the problem is that I am not setting up
    html radio buttons, but asp radio button lists which are rendered as a
    table.

    > After doing that, post the URL and ask about tuning the visual
    > appearance, if you think that's a problem you cannot solve
    > on your own.


    I did.

    This IS the problem I can't solve.

    Tom
    >
    > --
    > Yucca, http://www.cs.tut.fi/~jkorpela/
    > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    >
    >
    tshad, Apr 3, 2005
    #13
  14. tshad

    Toby Inkster Guest

    tshad wrote:
    > Toby Inkster <> wrote:
    >> Roy Schestowitz wrote:
    >>
    >> > Use a 3-column table within. A table cannot be placed in-line with other
    >> > elements.

    >>
    >> <table style="display:inline-table">...</table>

    >
    > That doesn't seem to work.


    "display:inline-table" and its friend "display:inline-block" have limited
    browser support at the moment. They are (of course) both supported by
    Opera and have been for quite some time. IIRC, Mozilla and its brethren
    support one of them, but not the other. I can't remember which.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Apr 3, 2005
    #14
  15. tshad

    Adrienne Guest

    Gazing into my crystal ball I observed Travis Newbury <>
    writing in news:6pv3e.2706$:

    > Jukka K. Korpela wrote:
    >>><title>Untitled Document</title>

    >> According to Google, myriads of pages have actually been published

    with
    >> such a title, by the way. If an authoring tool creates such nonsense,
    >> the first thing in creating a new page should be to change the title
    >> text. Even for test pages, since otherwise you learn wrong habits.

    >
    > You know, this is an excellent (and very often missed) point!
    >
    >


    I have my editor set up as
    <title><!-- Change Title --></title>

    So, when I am viewing the page in a browser, if I forgot, I notice it
    right away.

    I also have comments red on yellow so they stand out. Hrmph, I still
    forget sometimes, hence, that text.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne, Apr 3, 2005
    #15
  16. tshad

    Spartanicus Guest

    Toby Inkster <> wrote:

    >>> <table style="display:inline-table">...</table>

    >>
    >> That doesn't seem to work.

    >
    >"display:inline-table" and its friend "display:inline-block" have limited
    >browser support at the moment. They are (of course) both supported by
    >Opera and have been for quite some time. IIRC, Mozilla and its brethren
    >support one of them, but not the other. I can't remember which.


    Unless something has changed in recent nightly builds, Gecko supports
    neither value.

    --
    Spartanicus
    Spartanicus, Apr 3, 2005
    #16
  17. tshad

    tshad Guest

    "Toby Inkster" <> wrote in message
    news:p...
    > tshad wrote:
    > > Toby Inkster <> wrote:
    > >> Roy Schestowitz wrote:
    > >>
    > >> > Use a 3-column table within. A table cannot be placed in-line with

    other
    > >> > elements.
    > >>
    > >> <table style="display:inline-table">...</table>

    > >
    > > That doesn't seem to work.

    >
    > "display:inline-table" and its friend "display:inline-block" have limited
    > browser support at the moment. They are (of course) both supported by
    > Opera and have been for quite some time. IIRC, Mozilla and its brethren
    > support one of them, but not the other. I can't remember which.
    >

    Actually, both work in Opera and neither seem to work for Mozilla, firefox,
    Netscape or IE.

    The following has display:inline-block.

    http://www.payrollworkshop.com/samples/tableAlign3.htm

    Thanks,

    Tom
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > Contact Me ~ http://tobyinkster.co.uk/contact
    >
    tshad, Apr 3, 2005
    #17
    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. RobM
    Replies:
    0
    Views:
    710
  2. Deniz Bahar
    Replies:
    2
    Views:
    451
    Andrey Tarasevich
    Mar 9, 2005
  3. freemont

    lining up image with text

    freemont, Oct 29, 2007, in forum: HTML
    Replies:
    3
    Views:
    348
    Jonathan N. Little
    Oct 29, 2007
  4. Replies:
    4
    Views:
    171
    7stud --
    Jan 28, 2008
  5. usaims

    XML columms not lining up.

    usaims, Jan 11, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    198
    usaims
    Jan 11, 2006
Loading...

Share This Page