You are here: Re: Prevent listbox from resizing horizontally « HTML « IT news, forums, messages
Re: Prevent listbox from resizing horizontally

Posted by dorayme on 06/30/07 11:53

In article <slrnf8c67g.2lh.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:

> On 2007-06-29, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> > In article <slrnf89ecs.8cn.spamspam@bowser.marioworld>,
> > Ben C <spamspam@spam.eggs> wrote:
> >
> >> On 2007-06-28, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> >> >
> >> > <http://tinyurl.com/34nojy>
> >>
> >> Do you mean when the viewport is narrowed to about 400px you get a
> >> horizontal scrollbar for the whole page?
> >
> > No, I mean simply that no horizontal bars appear in Safari, FF,
> > Opera and some other browsers when the browser window width has
> > run out of room to show the 600px that is specified for that
> > first cell. Whereas iCab says, "There's no room left to get the
> > 600px in and the other right cell, so I will provide a scrollbar"
> >
> > Please tell me if this is not so on your versions of FF, Opera,
> > etc. (I realise you might not have iCab)
>
> No you're right again, ...
>
> Yes, to confirm this, if you set a width of 600px on one cell you
> effectively set the "preferred" width of that cell, which contributes to
> the preferred width of the whole table. But the actual width the table
> will get is a compromise between its preferred width, the available
> width, and its content minimum width. If available is less than
> preferred, then that 600px cell will have to shrink a bit.
>
> If you put a verylongwordwithnospaces in that cell, you will find that
> it will not shrink to smaller than the space needed for the word, and at
> that point you will get a horizontal scrollbar.
>
> This is what FF, Opera, Konqueror all do, but you're saying not iCab,
> which treats the 600px effectively as a minimum width as well as as a
> preferred width-- it treats that cell exactly as though it contained a
> long unbreakable word that required a 600px wide cell.

Yes. That is a good way of putting it. You can see the difference
between iCab and the other browsers on this by simply putting in
a very long unbreakable word and making the text real small so
that there is plenty of room for the word and spare in the first
left cell. If you alter the browser window width, iCab behaves
differently to other browsers; it behaves like the other browsers
when the word fills the cell and springs the scroll bars at the
slightest threat to the width. Now when you start increasing the
text size to when it fills the width, iCab seems, of course, to
behave the same as the other browsers (but only because it is
operating on the width of the cell anyway, whereas the other
browsers are operating on the content - these being the same in
this special circumstance)
>
> If however you set style=width: 600px on the _table_ rather than on one
> of the <td>s, it will get at least 600px and so you'll get a horizontal
> scrollbar when you make the browser window narrower, even when there's
> nothing much in the cells.
>

Now on _this_ variation, iCab behaves as the other browsers (ie
on table width set)

> [...]
> > iCab stands alone on my machine in this respect. It shows
> > scrollbars in response to the code of the url above as described.
>
> None of this is really specified in much detail, but CSS 2.1 has a
> "non-normative" section (17.5.2) on automatic table layout which says:
>
> 2. For each column, determine a maximum and minimum column width
> from the cells that span only that column. The minimum is that
> required by the cell with the largest minimum cell width (or the
> column 'width', whichever is larger). The maximum is that
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> required by the cell with the largest maximum cell width (or the
> column 'width', whichever is larger).
>
> The bit I've "underlined" justifies what iCab is doing, but it's not
> what anyone else does.

Now that is interesting. If it is non-normative, it sounds like
iCab is the strictly correct one... But anyway, these are the
realities. I still don't know or can't remember how IE behaves in
all of this. To tell you the truth, I dislike setting widths to
table cells or even tables. I prefer to let the table work its
magic on the content and it mostly does an excellent natural job.
So I don't store up knowledge about all this width stuff.

--
dorayme

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация