how to make a page regrow with browser size?

S

soni2926

Hi,
I wanted to make a page which will contain a table, but wanted to have
it so that the contents are not cut off it the user resizes his/her
window while on the site, i know i've seen it done before but can't
locate it. can someone point me to an example i can use. also is this
common, guessing not as i've seen more sites that are fixed width and
did not have their tables shrink/expand as the browser window was
resized.
 
J

Johannes Hafner

soni2926 said:
Hi,
I wanted to make a page which will contain a table, but wanted to have
it so that the contents are not cut off it the user resizes his/her
window while on the site, i know i've seen it done before but can't
locate it. can someone point me to an example i can use. also is this
common, guessing not as i've seen more sites that are fixed width and
did not have their tables shrink/expand as the browser window was
resized.

First of all I have to make clear, that tables in HTML are not a
layout-tool. So if you use that table for positioning your elements,
than remove the table first and replace it by some nice CSS code and
perhaps a view <div>-tags. Otherwise your project will fail anyway.

The key to succes in this case lies in relative width declarations. If
you do not use any absolute width declarations that apply to your table
or any element around your table, it will automatically resize if you
resize your browser window.

For more detailed proposals it would be helpful to give us an URL to
your document ;)
 
J

Johannes Hafner

Johannes said:
First of all I have to make clear, that tables in HTML are not a
layout-tool. So if you use that table for positioning your elements,
than remove the table first and replace it by some nice CSS code and
perhaps a view <div>-tags. Otherwise your project will fail anyway.

The key to succes in this case lies in relative width declarations. If
you do not use any absolute width declarations that apply to your table
or any element around your table, it will automatically resize if you
resize your browser window.

For more detailed proposals it would be helpful to give us an URL to
your document ;)

Oh, guess I got your question wrong. Excuse me.

Perhaps the CSS-propertys "min-width" or "overflow" will be a solution.
 
N

Neredbojias

Hi,
I wanted to make a page which will contain a table, but wanted to
have it so that the contents are not cut off it the user resizes
his/her window while on the site, i know i've seen it done before but
can't locate it. can someone point me to an example i can use. also
is this common, guessing not as i've seen more sites that are fixed
width and did not have their tables shrink/expand as the browser
window was resized.

Your question is ambiguous. Taking a stab at it, try percentage
dimensions for the table.
 
J

Johannes Hafner

Neredbojias said:
Your question is ambiguous. Taking a stab at it, try percentage
dimensions for the table.

Was my firt guess, too. But taking a closer look at the question I
noticed, that that actually was not the question. I guess he/she already
has a table, that is dynamic-width but contains very long word or images
wich are not completely visible any more if the table gets very tiny.
 
D

dorayme

Sherm Pendley said:
That's the default behavior. You have to take extra steps to avoid having
your page work like that.


Yes, in fact quite often best to put no presentational styling for
widths (or heights) in the HTML tables or in CSS. Padding is usually
more than mere nice (the default being crazily zero), borders usually
best too (the default definitely being crazily zero).

By default, table cells are shrink-to-fit (STF) in respect to cell
content; also tables are STF in respect to their cells, that is, they
don't expand to fill the containing block, (which can be the browser
window in effect).

If you specify a width for the table itself, say 100%, it operates under
that parameter and the cells become ETF in a slightly complicated dance
between STF and ETF.
 
N

Neredbojias

Was my firt guess, too. But taking a closer look at the question I
noticed, that that actually was not the question. I guess he/she
already has a table, that is dynamic-width but contains very long
word or images wich are not completely visible any more if the table
gets very tiny.

Could be... The comment about fixed tables suggests so but there
simply isn't enough information in the posting to tell what the OP's
real problem is (-outside of poor communication's skills.)
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top