|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> Or use a 55px wide clear gif and don't tell anyone.
I was thinking of doing just that -- in the unused bottom row. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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/ |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
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> |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
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/ |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
> 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. |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
> 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. |
|
![]() |
| Outils de la discussion | |
|
|