This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > February 2004 > Table width problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Table width problem
|
|
| elaineD123 2004-02-20, 6:28 pm |
| Hi everyone,
I have a very frustrating problem with the table cell width right now. I am
using a database in the backend and a table to display the records 1 row at a
time. For each row, I have Name, Address. Telephone, Email and a Update and a
Delete button. Please see example page here
http://s87465674.onlinehome.us/sample.html
Because this table needs to be aligned with the line that says "Today is Fri
Feb 20 12:39:16 PST 2004", so it has a width limit of 570. When I created this
table, I set the width to be 570, however, because the actual data is quite
long, the result table just stretches to however long it needs, so I have this
very unpleasantly long table.
I tried specifying a transparent GIF as the table cell's background with a
exact width, but it did not work, the table still streches. Along the same
line, in Dreamweaver MX, the style table has a green border with two numbers,
the first one is the number that I entered in, but the second number in () is
the actual width, there seems to be no way for me to adjust either one of the
numbers.
Please help me! Thank you!
| |
| Murray *TMM* 2004-02-20, 6:28 pm |
| Elaine:
You cannot control table cells with dimensions. Period. The cells (at
least any cell other than one at 100%) will be sized as the needs of the
table dictate. Since this is the case, removing all dimensions from your
table as a last step is a good idea. Let the table collapse around its
contents which is what it will want to do anyhow.
> so it has a width limit of 570
You may think that, but clearly the table doesn't. Something in the table
is making it stretch beyond that point.
> the result table just stretches to however long it needs, so I have this
> very unpleasantly long table.
Yes - this is precisely how HTML tables work.
> I tried specifying a transparent GIF as the table cell's background with
a
> exact width
Well, a background image will never hold a cell or a table open.
> there seems to be no way for me to adjust either one of the
> numbers.
The first number is adjusted in the code (the table width). The second
number reflects what the contents of the table would require. The only way
to adjust that number would be to a) adjust the tables contents, or b)
adjust the table's stucture so that outsized contents were removed from the
sphere of this table's sizing algorithm.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"elaineD123" <webforumsuser@macromedia.com> wrote in message
news:c15ucl$2ph$1@forums.macromedia.com...
> Hi everyone,
>
> I have a very frustrating problem with the table cell width right now. I
am
> using a database in the backend and a table to display the records 1 row
at a
> time. For each row, I have Name, Address. Telephone, Email and a Update
and a
> Delete button. Please see example page here
> http://s87465674.onlinehome.us/sample.html
>
> Because this table needs to be aligned with the line that says "Today is
Fri
> Feb 20 12:39:16 PST 2004", so it has a width limit of 570. When I created
this
> table, I set the width to be 570, however, because the actual data is
quite
> long, the result table just stretches to however long it needs, so I have
this
> very unpleasantly long table.
>
> I tried specifying a transparent GIF as the table cell's background with
a
> exact width, but it did not work, the table still streches. Along the
same
> line, in Dreamweaver MX, the style table has a green border with two
numbers,
> the first one is the number that I entered in, but the second number in ()
is
> the actual width, there seems to be no way for me to adjust either one of
the
> numbers.
>
> Please help me! Thank you!
>
| |
| mzanime.com 2004-02-20, 6:28 pm |
| >>which is what it will want to do anyhow.
I never thought of it that way, but thats so true.
| |
|
|
| Gary White 2004-02-20, 7:29 pm |
| On Fri, 20 Feb 2004 16:49:50 -0500, "Murray *TMM*"
<forums@HAHAgreat-web-sights.com> wrote:
>You cannot control table cells with dimensions. Period. The cells (at
>least any cell other than one at 100%) will be sized as the needs of the
>table dictate.
Even one specified to be 100% will grow wider if the content demands it.
;-) The only way around that is with the CSS "table-layout: fixed". See
http://www.w3.org/TR/REC-CSS2/table...d-table-layout. However,
browser support is spotty at best. When a browser respects the
table-layout: fixed, excess content will be truncated and not visible to
the user.
Gary
| |
| elaineD123 2004-02-20, 8:29 pm |
| I see.
I know now why my attempts did not work, but I really have seen neatly
laid-out tables on other sites--can't think of any right now. How did they do
that ? There has to be some workaround, right? I will try using the stylesheet
table layout fixed and see what happens. Thanks for your reply and it's very
helpful!
| |
| Murray *TMM* 2004-02-20, 9:28 pm |
| I do neatly laid-out tables all the time. The trick is to anticipate the
table's actions and to not fool yourself into thinking that your dimensions
are worth a dime.
Allow the table to collapse around its contents. Plan your contents so that
they hold the table in shape.
Check this -
http://www.dwfaq.com/tutorials/Tabl...ible_tables.asp
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"elaineD123" <webforumsuser@macromedia.com> wrote in message
news:c168jn$eb3$1@forums.macromedia.com...
> I see.
>
> I know now why my attempts did not work, but I really have seen neatly
> laid-out tables on other sites--can't think of any right now. How did
they do
> that ? There has to be some workaround, right? I will try using the
stylesheet
> table layout fixed and see what happens. Thanks for your reply and it's
very
> helpful!
>
| |
| Barry Pearson 2004-02-21, 7:28 am |
| elaineD123 wrote:
> I see.
>
> I know now why my attempts did not work, but I really have seen
> neatly laid-out tables on other sites--can't think of any right now.
> How did they do that ? There has to be some workaround, right? I will
> try using the stylesheet table layout fixed and see what happens.
> Thanks for your reply and it's very helpful!
My advice is "only use { table-layout: fixed } as an optional extra". In other
words, ensure that things work without it, then add it if you want the table
to render faster in compliant browsers.
--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
| |
| mzanime.com 2004-02-21, 5:28 pm |
| I even feel kinda iffy about that { table-layout: fixed }. Think about browsers
prior to version 4+, if you have a page thats dependant upon { table-layout:
fixed } they will completely fall apart because they don't understand CSS
anyway.
| |
| Murray *TMM* 2004-02-21, 5:28 pm |
| Who uses those?
The iffy part is that the content is TRUNCATED to match those dimensions.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"mzanime.com" <webforumsuser@macromedia.com> wrote in message
news:c18fpj$o73$1@forums.macromedia.com...
> I even feel kinda iffy about that { table-layout: fixed }. Think about
browsers
> prior to version 4+, if you have a page thats dependant upon {
table-layout:
> fixed } they will completely fall apart because they don't understand CSS
> anyway.
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|