aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Display Tag css issues in IE and FF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Display Tag css issues in IE and FF" Watch "Display Tag css issues in IE and FF" New topic
Author

Display Tag css issues in IE and FF

Rama Krishna
Ranch Hand

Joined: Oct 16, 2007
Posts: 110


The display tag http://sourceforge.net/projects/displaytag/ allows us to create dynamic tables in jsp. The above CSS is a modified version of the CSS obtained from http://sourceforge.net/forum/forum.php?thread_id=1651503&forum_id=249318

The above CSS fixes two issues:
1.) Issue when table goes beyond page width?
I extended the css a little beyond by creating a frame (see displayTableFrame above) as the table width often goes beyond the page width. This does an ok job however, there are many issues that the frame does not work in Internet Explorer at all.

.displayTableFrame {
background-color: white;
overflow-x: scroll;
height: 320px;
width: 100%;
}
As again I have no clue how we can control the height based on all other data in a page so that it fits exactly in the single page. I am working on fixing the CSS to get the height automatically adjusted soon. Currently the height is based on the actual display table height which is also fixed as you can see in the .dataTable CSS

2.) The vertical scroll bar appearing on the right hand side of the display table creates a horizontal scroll bar in the bottom in all browsers.
.dataTable tbody {
height: 230px;
overflow-x: hidden;
}
The overflow-x:hidden removes that ugly horizontal scrollbar. The frame in itself gets you a horizontal scrollbar only when the table goes beyond the page width. All of this was tested in FireFox.

A quick tip add an extra column at the end of all columns to move the vertical scrollbar a little further to the right as you can see the scrollbar hiding/overlapping some of the text of the last column.
<display:column title="">    
</display:column>

Having been said this. I am still stuck with getting this working in IE. I need some good help/input on the frame can also be fixed in Internet Explorer as well. How do we create a scrollable table body in both IE 5.5+ and FF? Unfortunately, I do not how to access the display table <tr> and <td> fields as they are created dynamically when you create a table in the JSP as follows.

JSP
---------

Appreciate any suggests/comments to make this work in IE.

-Cheers
Krishna

[ April 20, 2008: Message edited by: Rama Krishna ]

[ April 20, 2008: Message edited by: Rama Krishna ]
[ April 20, 2008: Message edited by: Rama Krishna ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display Tag css issues in IE and FF