• 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

actual/real size displayed on the screen

 
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Edward,

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

Herman
 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right, but how could I know the row's real height ?

Thanks
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic