blackball
Not New Member
Posts: 21
blackball said 0 great things
|
Post by blackball on Mar 23, 2011 8:26:29 GMT -8
Hiya Wormo, Thought i might start asking for a little help here on your site. I might have a little more luck. I am using the code shown below to take out topic and post columns from the main page. <script> //Remove "Topics and Posts" column from main page //wooper var TD = document.getElementsByTagName("TD") for(i=0;i<TD.length;i++){ if(TD[i].width == "1%" && TD[i+1].width == "1%") { TD[i].style.display ="none"; TD[i+1].style.display ="none"; TD[i-1].colSpan = '1'; } } </script> What I now require is a code that will make adjustments for the widths of the balance columns on the main page. I don’t want the code to adjust any sub board columns. illawarracuesports.proboards.comThanks in advance.
|
|
Bones
Code Helper
Posts: 131
Bones said 0 great things
|
Post by Bones on Mar 23, 2011 13:19:01 GMT -8
Give the Socal Code a try but just remember that there are limits. You can't for example resize the description cell to 1% since content would trump that size definition. The browser needs to display the content so if you choose a number that goes against that then it will be ignored. Perhaps you should mention the new sizes you're looking for
|
|
|
Post by Wormopolis on Mar 23, 2011 17:32:25 GMT -8
I was going to suggest what Eton did.
var widths = ['15%','40%','10%','10%','25%'];
the red ones need to add to 100%. run that after your current code to hide the columns.
keep in mind, however, that if you have any other codes that run on the main page that affect those cells, that this code needs to be after them or they will stop working.
|
|
blackball
Not New Member
Posts: 21
blackball said 0 great things
|
Post by blackball on Mar 23, 2011 18:25:40 GMT -8
Thankyou both Eton and Wormo, works great.
|
|
|
Post by Wormopolis on Mar 23, 2011 20:13:51 GMT -8
I missed the part about you removing the on/off coulmn as well, sothe second and fifth numbers should add to 100%
|
|