PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > How do I keep apparent table width independent of window size?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How do I keep apparent table width independent of window size?

Réponse
 
LinkBack Outils de la discussion
Vieux 31/03/2008, 14h43   #1
ilya2@rcn.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How do I keep apparent table width independent of window size?

I am making an HTML table. It has a lot of columns with fixed width
(55 pixels). If I view it on full-screen IE window, the table fits on
the screen and looks just as I want it to look. When I make the window
smaller than the table, I expect horizontal scroll bar to appear.
Instead each column shrinks; a cell which had:

word1 word2
word3

becomes:

word1
word2
word3

thus distorting the table and making it look ugly. Only when I make
the window so small that columns can not shrink any more (each is the
longest word wide), does horizontal scroll bar appear.

How can I avoid this -- keep the columns same width regardless of
window size? I already tried giving the table a fixed width -- it does
not solve the problem, if anything makes it worse.
  Réponse avec citation
Vieux 31/03/2008, 18h24   #2
ilya2@rcn.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

> Or use a 55px wide clear gif and don't tell anyone.

I was thinking of doing just that -- in the unused bottom row.
  Réponse avec citation
Vieux 31/03/2008, 21h56   #3
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

On 2008-03-31, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article
><9b45905a-7e68-4b3c-a39f-41cef459ed20@b64g2000hsa.googlegroups.com>,
> ilya2@rcn.com wrote:
>
>> I am making an HTML table. It has a lot of columns with fixed width
>> (55 pixels). If I view it on full-screen IE window, the table fits on
>> the screen and looks just as I want it to look. When I make the window
>> smaller than the table, I expect horizontal scroll bar to appear.
>> Instead each column shrinks; a cell which had:
>>
>> word1 word2
>> word3
>>
>> becomes:
>>
>> word1
>> word2
>> word3
>>
>> thus distorting the table and making it look ugly. Only when I make
>> the window so small that columns can not shrink any more (each is the
>> longest word wide), does horizontal scroll bar appear.
>>
>> How can I avoid this -- keep the columns same width regardless of
>> window size? I already tried giving the table a fixed width -- it does
>> not solve the problem, if anything makes it worse.

>
> If you fix width all the cells and all the same and in pixels, you do
> run into all sorts of problems; what would you want to happen, for
> example, if the user upped his text size, where is the text to go if it
> cannot fit?


Unless you use table-layout: fixed, it will fit, no matter how narrow
the cells are made.

> Everything depends on the details of your project, perhaps a url might
> . But perhaps this will give you a thought to play with: Don't
> bother with giving the table itself a width, try min-width in em for
> either all the cells or selected cells (by classing them is most
> reliable). Choose a size to fit the point below which text will wrap to
> your displeasure:
>
> td {border: 1px solid; min-width: 20em;}


Width on table cells kind of means minimum width anyway.

[...]
> Or use a 55px wide clear gif and don't tell anyone.


I'm surprised setting a width on the whole table didn't work as intended
but then the OP is talking about IE where anything goes.
  Réponse avec citation
Vieux 31/03/2008, 22h31   #4
Jukka K. Korpela
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

Scripsit ilya2@rcn.com:

> I am making an HTML table. It has a lot of columns with fixed width
> (55 pixels).


Why? Do they all contain images? And how many lots of such columns do
you expect to fit into a fairly reasonably 400 or 500 pixels wide
window?

On the other hand, for all that you can know, 55 pixels might not be
enough for a single character.

Post the URL, and maybe someone can suggest a way to redesign the table.
It probably needs a redesign, or more.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

  Réponse avec citation
Vieux 31/03/2008, 23h31   #5
Petr Vileta
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

ilya2@rcn.com wrote:
> I am making an HTML table. It has a lot of columns with fixed width
> (55 pixels). If I view it on full-screen IE window, the table fits on
> the screen and looks just as I want it to look. When I make the window
> smaller than the table, I expect horizontal scroll bar to appear.
> Instead each column shrinks; a cell which had:
>
> word1 word2
> word3
>
> becomes:
>
> word1
> word2
> word3
>

You can use

<td nowrap>word1 word2<br>word3</td>

or

<td><nobr>word1 word2<br>word3</nobr></td>

--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

  Réponse avec citation
Vieux 01/04/2008, 19h59   #6
ilya2@rcn.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

On Mar 31, 5:31pm, "Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
> Scripsit il...@rcn.com:
>
> > I am making an HTML table. It has a lot of columns with fixed width
> > (55 pixels).

>
> Why? Do they all contain images? And how many lots of such columns do
> you expect to fit into a fairly reasonably 400 or 500 pixels wide
> window?


I do not expect it to fit on a 400 to 500 pixels wide window.

> On the other hand, for all that you can know, 55 pixels might not be
> enough for a single character.
>
> Post the URL, and maybe someone can suggest a way to redesign the table.
> It probably needs a redesign, or more.


Here it is:

http://users.rcn.com/ilya187/TimeGraph.html
  Réponse avec citation
Vieux 01/04/2008, 22h07   #7
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

On 2008-04-01, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article <slrnfv2jve.hn7.spamspam@bowser.marioworld>,
> Ben C <spamspam@spam.eggs> wrote:
>
>> On 2008-03-31, dorayme <doraymeRidThis@optusnet.com.au> wrote:

>
>> > Everything depends on the details of your project, perhaps a url might
>> > . But perhaps this will give you a thought to play with: Don't
>> > bother with giving the table itself a width, try min-width in em for
>> > either all the cells or selected cells (by classing them is most
>> > reliable). Choose a size to fit the point below which text will wrap to
>> > your displeasure:
>> >
>> > td {border: 1px solid; min-width: 20em;}

>>
>> Width on table cells kind of means minimum width anyway.
>>
>> [...]

>
> Safari 2 is different to Firefox in the effects.
>
> A table with td {border: 1px solid; width: 200px;} behaves differently
> in different browsers to td {border: 1px solid; min-width: 200px;}


Yes, width and min-width are different.

Firefox seems to think that min-width doesn't apply to table cells at
all from what I can see.

But width on a table-cell is a minimum width (in the ordinary language
sense) because you only get the width you asked for if it's >= the
minimum content width.
  Réponse avec citation
Vieux 02/04/2008, 08h06   #8
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

On 2008-04-01, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article <slrnfv5906.lu.spamspam@bowser.marioworld>,
> Ben C <spamspam@spam.eggs> wrote:
>
>> On 2008-04-01, dorayme <doraymeRidThis@optusnet.com.au> wrote:
>> > In article <slrnfv2jve.hn7.spamspam@bowser.marioworld>,
>> > Ben C <spamspam@spam.eggs> wrote:
>> >
>> >> On 2008-03-31, dorayme <doraymeRidThis@optusnet.com.au> wrote:
>> >...
>> >> > td {border: 1px solid; min-width: 20em;}
>> >>
>> >> Width on table cells kind of means minimum width anyway.
>> >>
>> >> [...]
>> >
>> > Safari 2 is different to Firefox in the effects.
>> >
>> > A table with td {border: 1px solid; width: 200px;} behaves differently
>> > in different browsers to td {border: 1px solid; min-width: 200px;}

>>
>> Yes, width and min-width are different.
>>
>> Firefox seems to think that min-width doesn't apply to table cells at
>> all from what I can see.

>
> True, with FF, one can save one's breath for all the notice it takes of
> this in a table.


Min-width on table-cells does fall through the cracks a bit. The spec
doesn't say it doesn't apply to them, but in the bit that tells you what
to do with min-width (10.4), it refers you back to "Calculating widths
and Margins 10.3" which explains everything except tables and table
cells.

And you obviously can't just blindly apply the rules in 10.4 to table
cells since all cells in a column have to have the same width.
  Réponse avec citation
Vieux 03/04/2008, 17h05   #9
Jukka K. Korpela
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

Scripsit ilya2@rcn.com:

> I do not expect it to fit on a 400 to 500 pixels wide window.


Or in any reasonable width, for that matter.

> http://users.rcn.com/ilya187/TimeGraph.html


It barely fits in my browser in fullscreen mode, which I use rarely, and
it is not even barely legible (and I just got new eyeglasses). If you
stop making the text illegibly small, it becomes evident that the
approach simply won't work on the WWW (and hardly elsewhere too - it's
simply too large a table to be useful).

I have no idea of what the table is supposed to tell. If you just want
to tell "how the flotilla of Earth's emissaries throughout the solar
system has grown and shrunk with time - but mostly grown", then a
_simple_ diagram, a quantitative histogram, would do. You could make the
histogram an image or spend some time in finding a way to do it in HTML
and CSS. (Hint: you could use floated boxes or positioned boxes.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

  Réponse avec citation
Vieux 03/04/2008, 18h48   #10
ilya2@rcn.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

> I have no idea of what the table is supposed to tell. If you just want
> to tell "how the flotilla of Earth's emissaries throughout the solar
> system has grown and shrunk with time - but mostly grown", then a
> _simple_ diagram, a quantitative histogram, would do.


Yes, just that -- with hyperlinks to each individual space probe.

> You could make the
> histogram an image or spend some time in finding a way to do it in HTML
> and CSS. (Hint: you could use floated boxes or positioned boxes.)


I will consider it, but you are the first person who claims it is
unreadably small. All other responses I got so far were positive.
  Réponse avec citation
Vieux 03/04/2008, 20h39   #11
Darin McGrew
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

Re: http://users.rcn.com/ilya187/TimeGraph.html
"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote:
>> You could make the
>> histogram an image or spend some time in finding a way to do it in HTML
>> and CSS. (Hint: you could use floated boxes or positioned boxes.)


<ilya2@rcn.com> wrote:
> I will consider it, but you are the first person who claims it is
> unreadably small. All other responses I got so far were positive.


Did you expect <font size=1> to be easy to read? And the names must be
read, because a given name appears in different columns in different rows.

With my minimum font size enabled, it isn't bad. But the table forces
horizontal scrolling in my default browser window, and leaves lots of blank
space in my maximized browser window. And still, I end up seeing

Venera
5
Mariner
6

rather than

Venera 5
Mariner 6

This seems like a good place to use a non-breaking space.

But the information still wouldn't be easy to follow in this format.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, darin@html.com, http://www.HTML.com/

politician n. one who double-crosses a bridge when he comes to it
  Réponse avec citation
Vieux 03/04/2008, 21h17   #12
ilya2@rcn.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How do I keep apparent table width independent of window size?

> I found that, even with my browser window maximised, if the text
> was large enough to read comfortably, I had to keep scrolling
> from side-to-side to see what was happening towards the more
> recent (i.e. bottom) part of the table.


That's pretty much a given.

> I single graphic image - possibly as an image map - which would
> fit within a reasonable size window would be better to convey the
> overall growth in missions. Then find another way to present
> individual details to anyone who is interested (e.g. via image map
> links).


I will try to come up with something like that.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h34.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18646 seconds with 20 queries