Fixed size of cell

Discussion in 'HTML' started by tshad, Jan 4, 2005.

  1. tshad

    tshad Guest

    How do I control the fixed size of a cell?

    In the following example, I can control the sizes of the 2 outside cells if
    I don't set the middle cell to 100%.

    If I set the middle cell to 100%, it takes all the slack out of the left and
    right cells. This is fine for the right cell, as that is what I want. This
    cell will hold 1 or 2 buttons, so I set the size that will contain the 2
    buttons and when only one button is there the middle cell will push the size
    of the right cell to exactly the right size.

    I don't want that to happen on the left cell, however. I am trying to make
    this cell larger that the data it contains. Padding doesn't work, as I am
    using a font is not a fixed fonts, so the the right boundaries will not line
    up.

    I don't have a URL as I don't have a website for it, yet.

    *************************************************************************************
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Add New Company</title>
    <body>
    <table border="1" width="100%" CellPadding="0" CellSpacing="0"
    style="margin:0">
    <tr>
    <td style='font-family:Verdana, Arial, Helvetica, sans-serif;width:60' >
    <span id="DataList1__ctl0_QuestionType">MS</span>
    </td>
    <td width="100%">
    How many years have you been working in C#
    </td>
    <td width="100">
    <input type="submit" name="DataList1:_ctl0:_ctl0" value="Edit" />
    </td>
    </tr>
    </table>
    </body>
    </html>
    *************************************************************************************

    Thanks,

    Tom.
    tshad, Jan 4, 2005
    #1
    1. Advertising

  2. "tshad" <> wrote:

    > How do I control the fixed size of a cell?


    Stop trying to do so, at least until you understand the issue.

    > I don't have a URL as I don't have a website for it, yet.


    Then get one. It's disproportionate to expect that _everyone_ who wants
    to help you for free also takes the trouble of setting up a test page
    when you could have done it beforehand.

    > <td style='font-family:Verdana, Arial, Helvetica,
    > sans-serif;width:60' >


    And don't hesitate to use the available online checking tools to check
    for the syntax of your CSS. Errors like the above are particularly
    nasty since the construct may appear to "work" the intended way on
    faulty browsers. (Correctly behaving browsers ignore width:60.)

    > <td width="100%">


    If you set the width of one column to 100% of the available width, how
    much do you leave for the other columns?

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

  3. tshad

    tshad Guest

    "Jukka K. Korpela" <> wrote in message
    news:Xns95D4F407CC1E0jkorpelacstutfi@193.229.0.31...
    > "tshad" <> wrote:
    >
    >> How do I control the fixed size of a cell?

    >
    > Stop trying to do so, at least until you understand the issue.
    >
    >> I don't have a URL as I don't have a website for it, yet.

    >
    > Then get one. It's disproportionate to expect that _everyone_ who wants
    > to help you for free also takes the trouble of setting up a test page
    > when you could have done it beforehand.
    >
    >> <td style='font-family:Verdana, Arial, Helvetica,
    >> sans-serif;width:60' >

    >
    > And don't hesitate to use the available online checking tools to check
    > for the syntax of your CSS. Errors like the above are particularly
    > nasty since the construct may appear to "work" the intended way on
    > faulty browsers. (Correctly behaving browsers ignore width:60.)


    Why?

    As far as I can see width is a valid attribute.

    >
    >> <td width="100%">

    >
    > If you set the width of one column to 100% of the available width, how
    > much do you leave for the other columns?


    I thought that 100% meant 100% of the available, after the fixed was set up.
    Obviously wrong here.

    Thanks,

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

    Steve Pugh Guest

    "tshad" <> wrote:
    >"Jukka K. Korpela" <> wrote in message
    >news:Xns95D4F407CC1E0jkorpelacstutfi@193.229.0.31...
    >> "tshad" <> wrote:
    >>
    >>> <td style='font-family:Verdana, Arial, Helvetica,
    >>> sans-serif;width:60' >

    >>
    >> And don't hesitate to use the available online checking tools to check
    >> for the syntax of your CSS. Errors like the above are particularly
    >> nasty since the construct may appear to "work" the intended way on
    >> faulty browsers. (Correctly behaving browsers ignore width:60.)

    >
    >Why?
    >
    >As far as I can see width is a valid attribute.


    Width is a valid attribute. And 60 is a valid value for the width
    attribute.

    But you're not using the width attribute. You're using the style
    attribute. And the CSS property width takes a length as value. And 60
    is not a permitted length in CSS.

    Steve
    Steve Pugh, Jan 4, 2005
    #4
  5. tshad

    T.J. Guest

    "tshad" <> wrote in message
    news:yRECd.7276$...
    > "Jukka K. Korpela" <> wrote in message
    > news:Xns95D4F407CC1E0jkorpelacstutfi@193.229.0.31...
    >> "tshad" <> wrote:
    >>
    >>> How do I control the fixed size of a cell?

    >>
    >> Stop trying to do so, at least until you understand the issue.
    >>
    >>> I don't have a URL as I don't have a website for it, yet.

    >>
    >> Then get one. It's disproportionate to expect that _everyone_ who wants
    >> to help you for free also takes the trouble of setting up a test page
    >> when you could have done it beforehand.
    >>
    >>> <td style='font-family:Verdana, Arial, Helvetica,
    >>> sans-serif;width:60' >

    >>
    >> And don't hesitate to use the available online checking tools to check
    >> for the syntax of your CSS. Errors like the above are particularly
    >> nasty since the construct may appear to "work" the intended way on
    >> faulty browsers. (Correctly behaving browsers ignore width:60.)

    >
    > Why?
    >
    > As far as I can see width is a valid attribute.
    >


    60 what?
    T.J., Jan 4, 2005
    #5
    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. =?Utf-8?B?QmlkYXJrb3Rh?=

    How to set the DataGrid Row Size to a fixed size.

    =?Utf-8?B?QmlkYXJrb3Rh?=, May 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    813
    =?Utf-8?B?QmlkYXJrb3Rh?=
    May 19, 2005
  2. johnp
    Replies:
    4
    Views:
    3,655
    Toby Inkster
    May 23, 2005
  3. Fabian Vilers

    Table cell width fixed size

    Fabian Vilers, Apr 24, 2006, in forum: HTML
    Replies:
    11
    Views:
    94,707
    Rex the Strange
    Aug 19, 2009
  4. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,531
    Michael Jung
    May 25, 2008
  5. Nathan Sokalski
    Replies:
    12
    Views:
    1,929
    rob^_^
    Oct 2, 2009
Loading...

Share This Page