File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Liquid Layout (resizing the columns of table) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Liquid Layout (resizing the columns of table)" Watch "Liquid Layout (resizing the columns of table)" New topic

Liquid Layout (resizing the columns of table)

Anirudh Jhina

Joined: Jul 26, 2005
Posts: 5
i have a question. I am using liquid layout. There is a relative table with relative columns (i.e width speficed in % in the css file). on resize i want to truncate the text in the td and display "..." at the end if the text does not fit the column, and provide a tooltip to show the full contents.
How can i achieve this. Also this table is within a div tag. so on resize of the div element i have to provide this functionality. when is onResize event triggered for div ?

Thanks in advance

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You are talking manipulating the table data with JavaScript since there is no HTML or CSS that does this. It would be a lot of work.

Anirudh Jhina

Joined: Jul 26, 2005
Posts: 5
Yes that is, manipulating the entire table data on resize. But can we do it and if yes how?
Div tag has an even "onresize", when does it get triggerd. I tried

document.getElementById("divId").onresize = some function;
it did not work but when i replaced it with "window.onresize = some function" it worked when i resized by browser window.
What could be the reason. When i resize my window the height and widht of div also changes.

I agree. Here's the link:
subject: Liquid Layout (resizing the columns of table)
jQuery in Action, 3rd edition