![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Or use a 55px wide clear gif and don't tell anyone. |
#3
| |||
| |||
|
|
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. |
#4
| |||
| |||
|
|
In article 9b45905a-7e68-4b3c-a39f-41cef459ed20...oglegroups.com>, ilya2 (AT) rcn (DOT) 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? |
|
Everything depends on the details of your project, perhaps a url might help. 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;} |
|
Or use a 55px wide clear gif and don't tell anyone. |
#5
| |||
| |||
|
|
I am making an HTML table. It has a lot of columns with fixed width (55 pixels). |
#6
| |||
| |||
|
|
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 |
#7
| |||
| |||
|
|
On 2008-03-31, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: Everything depends on the details of your project, perhaps a url might help. 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. |
#8
| |||
| |||
|
|
Scripsit il... (AT) rcn (DOT) 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. |
#9
| |||
| |||
|
|
In article <slrnfv2jve.hn7.spamspam (AT) bowser (DOT) marioworld>, Ben C <spamspam (AT) spam (DOT) eggs> wrote: On 2008-03-31, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: Everything depends on the details of your project, perhaps a url might help. 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;} |
#10
| |||
| |||
|
|
On 2008-04-01, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: In article <slrnfv2jve.hn7.spamspam (AT) bowser (DOT) marioworld>, Ben C <spamspam (AT) spam (DOT) eggs> wrote: On 2008-03-31, dorayme <doraymeRidThis (AT) optusnet (DOT) 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |