• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resizing HTML Table Columns

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I found a piece of code online for resizing HTML table columns. With a little bit of changes, I was able to modify the code to suit my need. The issue is that, the functionality works fine in IE, but in FireFox, only the HTML table head gets resized and not the entire column. Could anyone help me figure out what could be causing this issue?

Note: Uncomment the line "obRight = ob.nextElementSibling;" for Firefox and comment out "obRight = ob.nextSibling;". Vice-Versa in IE.



Thanks
Naveen

 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried your code after uncommenting
and commenting
and nothing is happening in my Firefox on moving the mouse over the table headings. Whatever you are trying to do can be done easily (with no need to change the code according to browsers) using jQuery or any other such javascript libraries...
 
Naveen Ramanathan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ankit,

Thanks for the reply. I managed to find a solution to the problem. It looks like Firefox doesn't recognize the overflow:hidden property on either of TD or TH tags (or maybe ignores it). The workaround would be to enclose the contents of the td or the th within a div and then apply the overflow:hidden property to it. That seems to do the trick.

Also, I found a webpage that has a demo and a script to perform table resizing. It works fine in IE and FF.

http://bz.var.ru/comp/web/resizable.html

Thanks
Naveen
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic