This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Resizing HTML Table Columns

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
I am Arthur, King of the Britons. And this is a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic