How can I get css to ignore table width values?
Feb.17, 2007 in
CSS
rock o asked:
I am working on a layout template for someone, and I am including their php files into my main template file.
However, there are tables on the included php files and my template is pure css tableless.
The tables on the included php files keep breaking my template page. This is driving me nuts. How do I fix this?
Thanks in advance.
Custom Search
February 18th, 2007 at 4:21 pm
You’ll have to override the table properties in Javascript:
Post-process the tables by putting this at the page bottom:
tables = document.getElementsByTagName( ‘table’);
for(i=0; i< tables.length; i++) { tables[i].width = "50%"; tables[i].height = "50%"; } Modify values to suit and you can obviously change any property of the tables this way.