[Wylug-help] very simple HTML table colwidth issie

Simon Greenwood sfgreenwood at gmail.com
Thu Jan 23 13:58:34 UTC 2014


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
>



-- 
Twitter: @sfgreenwood
"TBA are particularly glib"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wylug-help/attachments/20140123/56705808/attachment.html>


More information about the Wylug-help mailing list