By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,954 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,954 IT Pros & Developers. It's quick & easy.

Any way to tell a table to go "as wide as necessary"?

P: n/a
I have a table for a report. It can get wide, but that's no big deal. I
don't mind that it can get wide.

What I do mind, though, is the browser doing its damndest to smash the thing
down to get it to fit the window (to no avail). It crams it down until it
can't cram any more and then pops up the horizaontal scroll bar, rather than
just "let go", and set the table free, scrollbar be damned.

Is there a way to tell the browser that my content area is "ok" to make as
big as necessary to keep it from crunching up my table?

The detail is that the table can show either a single month, a quarter, or a
year of data, and (being lazy) I'd rather not have to set the table widths,
and just let the thing flow naturally, but not necessarily wrapping all of
the text etc.

The other detail is that with the same markup, I change the content-type so
it can (as an option) show up in Excel (where this isn't a problem at all).
But I want it to look as nice as practical in the browser without having to
do a bunch of custom markup or an Excel specific version, etc.

Regards,

Will Hartung
(wi***@msoft.com)
Jul 23 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
Previously in comp.infosystems.www.authoring.html, Will Hartung
<wi***@msoft.com> said:
Is there a way to tell the browser that my content area is "ok" to make as
big as necessary to keep it from crunching up my table?


This is the default behaviour for tables. They will stretch as wide as
necessary to accommodate the content. If your table is not behaving that
way, post a URI.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #2

P: n/a
me
"Will Hartung" <wi***@msoft.com> wrote in message
news:39*************@individual.net...
I have a table for a report. It can get wide, but that's no big deal. I
don't mind that it can get wide.

What I do mind, though, is the browser doing its damndest to smash the thing down to get it to fit the window (to no avail). It crams it down until it
can't cram any more and then pops up the horizaontal scroll bar, rather than just "let go", and set the table free, scrollbar be damned.

Is there a way to tell the browser that my content area is "ok" to make as
big as necessary to keep it from crunching up my table?

The detail is that the table can show either a single month, a quarter, or a year of data, and (being lazy) I'd rather not have to set the table widths, and just let the thing flow naturally, but not necessarily wrapping all of
the text etc.

The other detail is that with the same markup, I change the content-type so it can (as an option) show up in Excel (where this isn't a problem at all). But I want it to look as nice as practical in the browser without having to do a bunch of custom markup or an Excel specific version, etc.

Regards,

Will Hartung
(wi***@msoft.com)


See the following:
Good Luck,
me

<td nowrap>Stuff you don't want to wrap.</td>
Jul 23 '05 #3

P: n/a
Gazing into my crystal ball I observed "me" <anonymous@_.com> writing in
news:11*************@corp.supernews.com:
"Will Hartung" <wi***@msoft.com> wrote in message
news:39*************@individual.net...
I have a table for a report. It can get wide, but that's no big deal.
I don't mind that it can get wide.

Is there a way to tell the browser that my content area is "ok" to
make as big as necessary to keep it from crunching up my table?


See the following:
Good Luck,
me

<td nowrap>Stuff you don't want to wrap.</td>

Depreciated

Better:

td {white-space: nowrap}
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 23 '05 #4

P: n/a
me
"Adrienne" <ar********@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.158 ...
Gazing into my crystal ball I observed "me" <anonymous@_.com> writing in
news:11*************@corp.supernews.com:
"Will Hartung" <wi***@msoft.com> wrote in message
news:39*************@individual.net...
I have a table for a report. It can get wide, but that's no big deal.
I don't mind that it can get wide.

Is there a way to tell the browser that my content area is "ok" to
make as big as necessary to keep it from crunching up my table?


See the following:
Good Luck,
me

<td nowrap>Stuff you don't want to wrap.</td>

Depreciated

Better:

td {white-space: nowrap}
--
Adrienne Boswell


I'm curious, how is this better and by whom is it depreciated?
Signed,
me
Jul 23 '05 #5

P: n/a
me wrote:
<td nowrap>Stuff you don't want to wrap.</td>
Deprecated

Better:

td {white-space: nowrap}


I'm curious, how is this better


It applies nowrap to all td's with a single line of code. No need to
have the deprecated tag in every td. It's scope of application is
controlled with ids or classes, and cascading.
and by whom is it deprecated?

W3C.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 23 '05 #6

P: n/a
me
"Jim Moe" <jm***************@sohnen-moe.com> wrote in message
news:Fb********************@giganews.com...
me wrote:
<td nowrap>Stuff you don't want to wrap.</td>

Deprecated

Better:

td {white-space: nowrap}


I'm curious, how is this better


It applies nowrap to all td's with a single line of code. No need to
have the deprecated tag in every td. It's scope of application is
controlled with ids or classes, and cascading.


That may be of use to the OP if he uses (or knows how to use) a style sheet.
and by whom is it deprecated?


W3C


No offense but I don't stop using code that works because the w3c thinks
it's depreciated but YMMV. Thank you for your reply, the OP now has a better
idea of why he might want to use that as an alternative to what I suggested.
Signed,
me
Jul 23 '05 #7

P: n/a
me wrote:
and by whom is it deprecated?


W3C


No offense but I don't stop using code that works because the w3c thinks
it's depreciated but YMMV.

Deprecated, not depreciated. :-)
The W3C does not *think* it is deprecated, they deprecated it
<http://www.w3.org/TR/html401/struct/tables.html#edef-TD>. That means it
disappears from the HTML standard in the next revision. Which means that
user agents (browsers) conforming to the new standard no longer recognize
the tag. (Of course there is always "quirks" mode.)
Using CSS has a few advantages:
1. Generally a *lot* less markup, especially in terms of tags.
2. Style is concentrated in a few files rather than spread all over a site.
3. It makes the markup code less sensitive to browser vagaries.
4. It allows web pages to age gracefully as standards move on.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 23 '05 #8

P: n/a
Previously in comp.infosystems.www.authoring.html, Jim Moe
<jm***************@sohnen-moe.com> said:
The W3C does not *think* it is deprecated, they deprecated it
<http://www.w3.org/TR/html401/struct/tables.html#edef-TD>. That means it
disappears from the HTML standard in the next revision. Which means that
user agents (browsers) conforming to the new standard no longer recognize
the tag. (Of course there is always "quirks" mode.)
No, it means they don't *have* to support it. It is unlikely they will
drop support any time soon though, given the number of legacy pages (and
unfortunately, new ones) that use deprecated elements and attributes.
Quirks mode or Standards mode don't have any effect on which
elements/attributes are support AFAIK.
Using CSS has a few advantages:
1. Generally a *lot* less markup, especially in terms of tags.
2. Style is concentrated in a few files rather than spread all over a site.
Indeed. Changes to styles requires changing just one file (or possibly a
couple), instead of every page on the site. If done well, the entire
design of a site can be changed without touching the HTML.
3. It makes the markup code less sensitive to browser vagaries.
Not sure I agree with that one.
4. It allows web pages to age gracefully as standards move on.


5. The CSS files are generally cached, so only need to be downloaded
once, rather than downloaded again with every new page.
6. There are some things only possible with CSS.
7. Browsers that don't support CSS can safely ignore it, while the
content remains accessible and well-structured.
8. It is *logical*. The HTML handles the content, the CSS handles the
presentation.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #9

P: n/a
me
"Jim Moe" <jm***************@sohnen-moe.com> wrote in message
news:8M********************@giganews.com...
me wrote:
and by whom is it deprecated?

W3C
No offense but I don't stop using code that works because the w3c thinks
it's depreciated but YMMV.

Deprecated, not depreciated. :-)


Adrianne's spelling not mine.
The W3C does not *think* it is deprecated, they deprecated it
<http://www.w3.org/TR/html401/struct/tables.html#edef-TD>. That means it
disappears from the HTML standard in the next revision.
A standard suggested by an agency with no power to enforce it, thankfully.
Which means that
user agents (browsers) conforming to the new standard no longer recognize
the tag.


That's unfortunate for those user agents because IMO <td nowrap> will be in
use long for some time to come. In any case my opinion is that IE will still
recognize the tag so there's no problem.

[snip css]

I know all about CSS but the important question is does the OP.
Signed,
me
Jul 23 '05 #10

P: n/a
Mark Parnell <we*******@clarkecomputers.com.au> wrote:
The W3C does not *think* it is deprecated, they deprecated it
<http://www.w3.org/TR/html401/struct/tables.html#edef-TD>. That means it
disappears from the HTML standard in the next revision. Which means that
user agents (browsers) conforming to the new standard no longer recognize
the tag. (Of course there is always "quirks" mode.)


No, it means they don't *have* to support it.


No such thing as UAs "having" to support elements, w3c copyrighting the
term "xhtml" makes no difference to that situation, at best it may give
w3c the right to challenge claims of software being "xhtml compliant".
But if a product supports xhtml minus some elements there is nothing w3c
can do to change that.

--
Spartanicus
Jul 23 '05 #11

P: n/a
On Tue, 15 Mar 2005 18:24:53 -0700, Jim Moe
<jm***************@sohnen-moe.com> wrote:
me wrote:
and by whom is it deprecated?

W3C
No offense but I don't stop using code that works because the w3c thinks
it's depreciated but YMMV.

Deprecated, not depreciated. :-)
The W3C does not *think* it is deprecated, they deprecated it
<http://www.w3.org/TR/html401/struct/tables.html#edef-TD>. That means it
disappears from the HTML standard in the next revision.


The W3C HTML WG have stated that there will not be another HTML
version, so what does deprectated mean in that situation? surely it's
completely irrelevant?
Using CSS has a few advantages:
1. Generally a *lot* less markup, especially in terms of tags.
'cept the DIV soup of sites like css-zengarden.
2. Style is concentrated in a few files rather than spread all over a site.
you need to re-test and QA the entire site after changing a single
look of one page.
3. It makes the markup code less sensitive to browser vagaries.
Browsers are considerably more sensitive to CSS quirks (not
surprisingly as rendering languages are always more sensitive by their
very nature)
4. It allows web pages to age gracefully as standards move on.


I just don't see this at all...

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #12

P: n/a
In <42****************@news.individual.net>, on 03/16/2005
at 08:48 AM, ji*@jibbering.com (Jim Ley) said:
The W3C HTML WG have stated that there will not be another HTML
version, so what does deprectated mean in that situation? surely
it's completely irrelevant?


Unless they've stated that there will not be another XHTML version,
it's clearly relevant.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to sp******@library.lspace.org

Jul 23 '05 #13

P: n/a
On Wed, 16 Mar 2005 12:59:27 -0500, "Shmuel (Seymour J.) Metz"
<sp******@library.lspace.org.invalid> wrote:
In <42****************@news.individual.net>, on 03/16/2005
at 08:48 AM, ji*@jibbering.com (Jim Ley) said:
The W3C HTML WG have stated that there will not be another HTML
version, so what does deprectated mean in that situation? surely
it's completely irrelevant?


Unless they've stated that there will not be another XHTML version,
it's clearly relevant.


How so? HTML and XHTML are different things?

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #14

P: n/a
Previously in comp.infosystems.www.authoring.html, Spartanicus
<me@privacy.net> said:
No such thing as UAs "having" to support elements,
What I really should have said, is that they no longer have to support
it to still be compliant with the specs.
w3c copyrighting the
term "xhtml" makes no difference to that situation, at best it may give
w3c the right to challenge claims of software being "xhtml compliant".
Yes. If a browser claims to be compliant with the specs, but doesn't
support a particular element, then that is obviously a false claim. If
the element in question is deprecated though, they can still honestly
claim compliance.
But if a product supports xhtml minus some elements there is nothing w3c
can do to change that.


Very true.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #15

P: n/a
Previously in comp.infosystems.www.authoring.html, Jim Ley
<ji*@jibbering.com> said:
How so? HTML and XHTML are different things?


Kind of. XHTML1 is just HTML4.01 reformulated in XML instead of SGML. So
anything deprecated in HTML4.01 is also deprecated in XHTML1.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #16

P: n/a
On Thu, 17 Mar 2005 09:18:40 +1100, Mark Parnell
<we*******@clarkecomputers.com.au> wrote:
Previously in comp.infosystems.www.authoring.html, Jim Ley
<ji*@jibbering.com> said:
How so? HTML and XHTML are different things?


Kind of. XHTML1 is just HTML4.01 reformulated in XML instead of SGML. So
anything deprecated in HTML4.01 is also deprecated in XHTML1.


Yes, that's fine, things being deprecated in XHTML 1 are sensible.

My question was strictly about HTML, the W3 HTML WG have said there
will be no more HTML versions, what does deprecated mean if there are
no more HTML versions. It's clear in the case of XHTML, but what
about HTML?

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #17

P: n/a
In <42****************@news.individual.net>, on 03/16/2005
at 08:19 PM, ji*@jibbering.com (Jim Ley) said:
How so? HTML and XHTML are different things?


Yes, although they are certainly similar. XHTML is intended to be the
replacement for HTML, and a valid XHTML document is an XML document.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to sp******@library.lspace.org

Jul 23 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.