You are here: Re: DIV « HTML « IT news, forums, messages
Re: DIV

Posted by Ben C on 02/09/07 07:53

On 2007-02-09, Roy A. <royarneskar@gmail.com> wrote:
> On 8 Feb, 22:15, Ben C <spams...@spam.eggs> wrote:
>> On 2007-02-08, wombat <6...@k.com> wrote:
>>
>> > Ok, since IFRAME didn't work for me.. I'm back to trying to use DIV.
>>
>> > What I have been trying to do is use DIV to force output to scroll if it
>> > exceeds the given height and width of the TD that contains the DIV. The
>> > TD is 50% of the screen in both height and width and I tried using
>> > overflow: scroll for the DIV tag but the output is still pushing the
>> > size of the TD beyond what I had it set for (and the scroll bar for the
>> > DIV tag still appears as it's supposed to with its overflow setting). Is
>> > it possible to force DIV to not push the height and width settings for
>> > the TD?
>>
>> Setting height and width on the DIV (and overflow: scroll) should do it.
>>
>> But you need to set them to actual values, not percentages, which is not
>> what you want.
>>
>> I don't see why percentages shouldn't work (after all the dimensions of
>> the containing block are resolvable), but they don't in Opera, Firefox or
>> Konqueror.
>
> Yes, the dimensions of the containing block are resolvable, but who
> should resolve it? You or the browser?
>
> The initial value for the height property is auto. For most containing
> blocks this means 0.

You right, I was overlooking the fact that the body's height is auto.

[...]
> Just specify the height of the initial containing block and any
> subsequent containing blocks:
>
> html, body, ... { height: 100% }

Exactly, and this confirms what's going on.

 

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

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