File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes actual/real size displayed on the screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "actual/real size displayed on the screen" Watch "actual/real size displayed on the screen" New topic
Author

actual/real size displayed on the screen

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
how could I know a component <b>actual/real</b> size displayed on the screen.

for example, I have a table, I do not define the height,

<table id="table" height="" border="1">
<tr><td>dddddddd</td></tr>
<tr><td>dddddddd222</td></tr>
</table>

Then after it displayed, I want to know the real hight and width displayed on screen. My purpose is to handle resize issues.

Thanks.
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi Edward,

number of rows * height per row (or is that too simple?)

Herman
Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
You are right, but how could I know the row's real height ?

Thanks
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi, you can set the row's height in your style sheet by setting the height of all "td"'s:

td{
line-height: 20px;
}

or if you only want to set height for "td"'s in a table with id="table"

table#table td{
line-height: 20px;
}

Herman
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: actual/real size displayed on the screen
 
Similar Threads
Struts1: evaluating two conditions
Positioning DIVs
Problem displaying a dynamic table on a JSP....
jsp:include and c:import combination/nesting
JSP Help Regarding the Radio Button