Loading ...
Sorry, an error occurred while loading the content.
 

DataTable Layout Issues...

Expand Messages
  • Hollywood
    Is there an issue in that FF does not obey the columns width specified with YUI 2.4.1? IE obeys the widths. I didn t see anything in the Known Issues. Listed
    Message 1 of 3 , Feb 3, 2008
      Is there an issue in that FF does not obey the columns width specified with YUI 2.4.1?  IE obeys the widths. I didn't see anything in the Known Issues.  Listed below is the source for a couple of tests that shows the differences (and issues) with DataTable layouts between IE and FF.
       
       
      a) Issue where there are no column widths specified.  IE displays the table across the entire width of the DataTable's DIV container's parent, i.e. the document body in this case.  FF only displays the table as wide as necessary to contain the information in the columns.
       
      b) Issue where you put a 'style="width:100%"' on the DataTable's DIV container.  Has no effect in FF.   If you specify a width less than 100%, in IE it will shrink the width of the table.  Again no effect in FF.
       
      c) Specifying several, but not all column widths.  This example sets the Quantity and Amount widths.  The widths are adjusted in IE, but have no effect in FF.
       
      d) Specify all the widths.  In IE, this shrinks the table to the total width of all the columns.  Again, no effect in FF.
       
      Also there is an issue with IE, in that if you don't specify column widths then IE will display the table as wide as the allows by the parent container, but will end up cutting off fields.  An example of this is shown in the Custom Cell example, http://developer.yahoo.com/yui/examples/datatable/dt_formatting_source.html.
    • Satake
      ... specified with YUI 2.4.1? IE obeys the widths. I didn t see anything in the Known Issues. Listed below is the source for a couple of tests that shows the
      Message 2 of 3 , Feb 3, 2008
        --- In ydn-javascript@yahoogroups.com, "Hollywood" <impulsegto@...> wrote:
        >
        > Is there an issue in that FF does not obey the columns width
        specified with YUI 2.4.1? IE obeys the widths. I didn't see anything
        in the Known Issues. Listed below is the source for a couple of tests
        that shows the differences (and issues) with DataTable layouts between
        IE and FF.
        >
        > An example is at
        http://www.thzero.com/programming/yui/dt_basic_clean.issues.html that
        demonstrates:
        >
        > a) Issue where there are no column widths specified. IE displays
        the table across the entire width of the DataTable's DIV container's
        parent, i.e. the document body in this case. FF only displays the
        table as wide as necessary to contain the information in the columns.
        >
        > b) Issue where you put a 'style="width:100%"' on the DataTable's DIV
        container. Has no effect in FF. If you specify a width less than
        100%, in IE it will shrink the width of the table. Again no effect in FF.
        >
        > c) Specifying several, but not all column widths. This example sets
        the Quantity and Amount widths. The widths are adjusted in IE, but
        have no effect in FF.
        >
        > d) Specify all the widths. In IE, this shrinks the table to the
        total width of all the columns. Again, no effect in FF.
        >
        > Also there is an issue with IE, in that if you don't specify column
        widths then IE will display the table as wide as the allows by the
        parent container, but will end up cutting off fields. An example of
        this is shown in the Custom Cell example,
        http://developer.yahoo.com/yui/examples/datatable/dt_formatting_source.html.
        >

        According to the html 4.01 spec the width of a table depends on the
        user agent when no width is supplied.
        http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.2.1
        So seems to me IE took that to mean tables = 100% width and FF thought
        take only as much room as we need.

        override css:
        .yui-skin-sam .yui-dt-table {width:100%;}
        and they all snap out to fill the enclosing div in FF

        Also if you look at the API docs:
        http://developer.yahoo.com/yui/docs/YAHOO.widget.Column.html#width

        width is supposed to be a string. which I think means

        this
        width:'45px'

        not
        width:45

        But even doing the string correctly it doesn't work right in IE yet. I
        seem to remember reading that column sizing was being worked on for 2.5.
      • Hollywood
        That s all well and good, however since the DataTable needs to be able to display the same regardless of browser. ... As to 45px vs 45 , it does not make a
        Message 3 of 3 , Feb 3, 2008
          That's all well and good, however since the DataTable needs to be able to display the same regardless of browser.
           
          > According to the html 4.01 spec the width of a table depends on
          the
          > user agent when no width is supplied.
          > http://www.w3. org/TR/REC- html40/struct/ tables.html# h-11.2.1
          >
          So seems to me IE took that to mean tables = 100% width and FF thought
          >
          take only as much room as we need.
           
          As to '45px' vs '45', it does not make a difference in my testing in IE and still fails to work in FF.
           
          There's also the issue with IE and overflow when widths aren't specified and the data in the cell is larger than the cell.
           
          Just hoping some of these issues are resolved with the updates, rework, etc. in 2.5... but just wanted to make mention of them so they do get corrected hopefully.
        Your message has been successfully submitted and would be delivered to recipients shortly.