[Wylug-help] very simple HTML table colwidth issie
Gary Stainburn
gary.stainburn at ringways.co.uk
Thu Jan 23 14:06:17 UTC 2014
My premis is that I have used identical text to define both tables so surely
both should be identical when rendered.
In both cases the table is larger than the DIV that contains it, but with
overflow allowed on both I would have thought that this was not the problem.
I cannot see why on the header table the TD is 'X' number of px wider than in
the data table, where 'X' seems to be a constant
On Thursday 23 January 2014 13:58:25 Simon Greenwood wrote:
> Hi -
>
> The table header and the table data have to be within the same table or
> they don't know about each other. You can use divs inside the table to
> define styles. IE is probably more fast and loose with this that Firefox
> and Chrome are. If they don't match up after that then you may have to
> fiddle with padding and colspans.
>
> s/
>
> On 23 January 2014 13:43, Gary Stainburn
<gary.stainburn at ringways.co.uk>wrote:
> > Hi folks.
> >
> > I'm having a go at a home grown solution for having a scollable table
> > with locked column headers. I've stripped the problem back to it's
> > simplest.
> >
> > I have two DIV's, one containing a table with the column headers in, one
> > with
> > a table containing the data.
> >
> > Despite both being defined the same, the TD widths on the two tables
> > differ,
> > which means that the headers don't line up.
> >
> > Can anyone tell me why please?
> >
> > BTW, it works in IE8 but not in Firefox. I'm guessing I need to set
> > something in CSS but as both div's and tables are set up the same I don't
> > know what.
> >
> > The last TD is 20px wider in the header, as is the table, to make room
> > for the
> > scroll bar in the table. However, I have removed this difference and it
> > didn't affect the problem.
> >
> > http://www1.ringways.co.uk/test_table.html
> >
> > Gary
> >
> > --
> > Gary Stainburn
> > Group I.T. Manager
> > Ringways Garages
> > http://www.ringways.co.uk
> >
> > _______________________________________________
> > Wylug-help mailing list
> > Wylug-help at wylug.org.uk
> > https://mailman.lug.org.uk/mailman/listinfo/wylug-help
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
More information about the Wylug-help
mailing list