473,795 Members | 3,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.co m)
Jul 23 '05 #1
17 2007
Previously in comp.infosystem s.www.authoring.html, Will Hartung
<wi***@msoft.co m> 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
me
"Will Hartung" <wi***@msoft.co m> wrote in message
news:39******** *****@individua l.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.co m)


See the following:
Good Luck,
me

<td nowrap>Stuff you don't want to wrap.</td>
Jul 23 '05 #3
Gazing into my crystal ball I observed "me" <anonymous@_.co m> writing in
news:11******** *****@corp.supe rnews.com:
"Will Hartung" <wi***@msoft.co m> wrote in message
news:39******** *****@individua l.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
me
"Adrienne" <ar********@sbc global.net> wrote in message
news:Xn******** *************** *****@207.115.6 3.158...
Gazing into my crystal ball I observed "me" <anonymous@_.co m> writing in
news:11******** *****@corp.supe rnews.com:
"Will Hartung" <wi***@msoft.co m> wrote in message
news:39******** *****@individua l.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
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
me
"Jim Moe" <jm************ ***@sohnen-moe.com> wrote in message
news:Fb******** ************@gi ganews.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
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#ede f-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
Previously in comp.infosystem s.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#ede f-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
me
"Jim Moe" <jm************ ***@sohnen-moe.com> wrote in message
news:8M******** ************@gi ganews.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#ede f-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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

68
4380
by: Marco Bubke | last post by:
Hi I have read some mail on the dev mailing list about PEP 318 and find the new Syntax really ugly. def foo(x, y): pass I call this foo(1, 2), this isn't really intuitive to me! Also I don't like the brackets.
40
3048
by: Steve Juranich | last post by:
I know that this topic has the potential for blowing up in my face, but I can't help asking. I've been using Python since 1.5.1, so I'm not what you'd call a "n00b". I dutifully evangelize on the goodness of Python whenever I talk with fellow developers, but I always hit a snag when it comes to discussing the finer points of the execution model (specifically, exceptions). Without fail, when I start talking with some of the "old-timers"...
134
7918
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that means that if I misspell a variable name, my program will mysteriously fail to work with no error message. If you don't declare variables, you can inadvertently re-use an variable used in an enclosing context when you don't intend to, or
1
7252
by: DB_2 | last post by:
Greetings, I was searching Google for ways to turn off transaction logging for some queries. I came across this old post from Feb 2003: > From: fareeda (fareeda@pspl.co.in) > Subject: Re: Question related to "CREATE TABLE AS SELECT" in DB2 > Newsgroups: comp.databases.ibm-db2 > Date: 2003-02-27 21:11:59 PST >
145
6353
by: Sidney Cadot | last post by:
Hi all, In a discussion with Tak-Shing Chan the question came up whether the as-if rule can cover I/O functions. Basically, he maintains it can, and I think it doesn't. Consider two programs: /*** a.c ***/
2
1350
by: kevininstructor | last post by:
My group is in the process of replacing desktop computers with laptops for several developers for primarily .NET development. What we thought about this morning was the possibility of using an external 19" wide screen monitor. My question: Anyone have experience using a 19" wide screen? Do you like it or would you have preferred a regular 19" monitor? Side note: Although I have not tried this myself I am thinking 1024x768 or
6
1748
by: OriginalBrownster | last post by:
Hi there... I'm still pretty new to turbogears. but i have gotten pretty familiar with it i'm just trying to clear something up, i'm having a difficult time using \ when declaring a string expression such as tempname="\"..it says that the line is single qouted.
1
2241
by: kellygreer1 | last post by:
Is there an easy way from .NET to register a Windows-wide keyboard shortcut? I would like to bring up a WinForm window from an already running .NET application whenever this keyboard shortcut is used. I assume the way to do this is calling the Windows API from .NET. Anyone have an experience with this? or can you point me in the right direction? Thanks in advance, Kelly Greer
1
12772
by: dave.j.thornton | last post by:
I'm attempting to create a new table, and populate it using the fields from two existing tables. The code is printed below. I get the error: "Run-time error '-2147217900 (80040e14)': Syntax error in CREATE TABLE statement." For what it's worth, when tested independently, the "SELECT " part of my CREATE TABLE statement works properly. Sub test() Dim cmd As ADODB.Command Set cmd = New ADODB.Command
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.