On Fri, Jun 12, 2009 at 5:34 PM, Jonathan Grotegut <[email protected]>wrote:

> Scott,
>
> You can use the width attribute on your table and set it to a percentage.
> ie  <table width=100%> which will make your table 100% of the browser
> window.
>
> http://www.w3.org/TR/REC-html40/struct/tables.html#adef-width-TABLE
>
> You can use the same attribute on the columns to auto size them.
>
> Jonathan
>
>
> On Fri, Jun 12, 2009 at 5:00 PM, Scott Hill <[email protected]> wrote:
>
>> Greetings.
>>
>> I need to construct an HTML table (for use with tabular data only of
>> course)
>> that will have a variable number of columns.  I want to adjust the width
>> of
>> the table depending on the width of the browser screen.  In other words, I
>> don't want the user to have to scroll horizontally to see the right end of
>> the table.  Instead I want to have a small drop down button in the top
>> right
>> corner that the user can click and see and/or select the remaining
>> columns.
>>  I have seen this done before but I can't remember where or how.
>>
>> Any suggestions?
>>
>> Other pertinent or interesting information.  I'm not using any kind of
>> framework and I am open to any reasonable CSS or javascript solutions.
>>
>> Thanks,
>> --
>> Scott Hill
>>
>> _______________________________________________
>>
>> UPHPU mailing list
>> [email protected]
>> http://uphpu.org/mailman/listinfo/uphpu
>> IRC: #uphpu on irc.freenode.net
>>
>
>

You can set the table width to 100% but if you add enough columns it will
push it beyond the the borders of the browser and add the horizontal scroll
bar at the bottom.  I was hoping to only add enough columns to the table to
keep in the bounds of the browser and then use some kind of javascript that
I have seen used with menus that would drop down the remaining columns.  I'm
not sure I am describing it correctly.  I will continue to research and
check examples, etc. I just thought someone on the list might have already
done it.
Thanks,
-- 
Scott Hill

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to