Table width to HTML
Posted: Sat Jul 26, 2008 3:33 pm
I use RVE to generate HTML to make simple web pages. I use (D7) TWebBrowser (...) to preview the result. For technical reasons, I have to programmatically wrap the entire resulting HTML into a <div> before preview. The table width is used to set the width of this .div in px.
If the user creates a table 1 row, 2 cols 600px wide table then puts a 400px wide picture into each cell, at export time, the wrapping .div will be 600px wide (= table width) but it needs to be at least 800px (+ border, padding etc.) to be cross-browser.
Is there a way to override the table width at export time according to the specified width (if any) of the cells contents (also taking cellpadding, cellspacing and border into account would be awesome).
My concern is that in the above case, the non-compliant preview (TWebBrowser) makes the user believe that everything is OK (IE wrongly expands the wrapping .div as you know), but the resulting HTML will be broken in any compliant browser (FF, Opera etc).
(Personal wish : Someone please shoot IE! )
If the user creates a table 1 row, 2 cols 600px wide table then puts a 400px wide picture into each cell, at export time, the wrapping .div will be 600px wide (= table width) but it needs to be at least 800px (+ border, padding etc.) to be cross-browser.
Is there a way to override the table width at export time according to the specified width (if any) of the cells contents (also taking cellpadding, cellspacing and border into account would be awesome).
My concern is that in the above case, the non-compliant preview (TWebBrowser) makes the user believe that everything is OK (IE wrongly expands the wrapping .div as you know), but the resulting HTML will be broken in any compliant browser (FF, Opera etc).
(Personal wish : Someone please shoot IE! )