Column width in Explorer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Entoll

    Column width in Explorer

    Hello,

    I need a table layout where all columns have a minimal width
    and one selected column takes all the available remaining
    horizontal space.

    According to the specs, this is exactly what the col and colgroup
    elements can achieve by using relative width attributes, e.g.
    <table width='100%'>
    <col width='0*'>
    <col width='0*'>
    <col width='1*'> <!-- this column would take the rest of the space -->
    <col width='0*'>
    <tr>...

    An example URL that works fine in Gecko/based browsers:


    Unfortunately, IE does not seem to recognize relative column widths.
    Is there any equivalent solution or workaround that would work in IE
    (apart from specifying hard-coded pixel or percent widths)?

    Thanks,
    Entoll
  • Brian

    #2
    Re: Column width in Explorer

    Entoll wrote:[color=blue]
    >
    > I need a table layout where all columns have a minimal width
    > and one selected column takes all the available remaining
    > horizontal space.
    >
    > According to the specs, this is exactly what the col and colgroup
    > elements can achieve by using relative width attributes, e.g.
    > <table width='100%'>
    > <col width='0*'>
    > <col width='0*'>
    > <col width='1*'> <!-- this column would take the rest of the space -->[/color]

    I don't see where in the spec the value "1*" is allowed. Have you
    validated your html?
    [color=blue]
    > <col width='0*'>[/color]

    In any case, why not use css to suggest presentation. That's what
    it's there for.
    [color=blue]
    > An example URL that works fine in Gecko/based browsers:
    > http://www.geocities.com/entoll/test/col.html[/color]

    So your table will hold text-based tabular data? Specify a width in
    em units.

    <table>
    <col>
    <col>
    <col id="sumdata">
    <col>

    <tr> <!-- etc. -->


    /* css */
    table {width: 100% }
    col {width: 7em }
    #sumdata {width: auto }

    Untested. Looks like it would work.

    --
    Brian
    follow the directions in my address to email me

    Comment

    Working...