NEWBIE Question: Autosize pop-up window to table size

P

Patrick

I have long used a script to autosize a window to image size and I was
wondering how I might do the same thing with table size. It seems like
it should be as simple, but I don't know what I'm doing. Any
suggestions would be appreciated. Thanks.

Patrick
 
T

Thomas 'PointedEars' Lahn

Patrick said:
I have long used a script to autosize a window to image size and I was
wondering how I might do the same thing with table size. It seems like
it should be as simple, but I don't know what I'm doing. Any
suggestions would be appreciated. Thanks.

An HTML table has no fixed size/width by default. One advantage
of HTML is that content is not scaled down (e.g. like PDF documents)
but flows according to the dimensions of the container box.

You can use CSS to specify the minimum width for compliant UAs
(min-width property, does not work in [recent] IEs) and you can
use JavaScript to resize the popup window if its width is below
that minimum width. For the height, you can resize the window
as well.

But keep in mind that many people dislike having their windows
resized automatically. Just think of tabbed browsing, for example.
window.open(...) may create a new Window object but will not create
a new window. It will create a new tab in the current window
instead, and if you resize that window, other documents displayed
in other tabs of that window may become not as well legible.

Allow scrollbars and/or an resizable popup window, that is the
best you can do.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top