Opened 16 years ago

Closed 15 years ago

#2215 closed defect (fixed)

TabContainer height incorrect with Doctype

Reported by: guest Owned by: koranteng
Priority: high Milestone: 0.9
Component: Widgets Version: 0.4.1
Keywords: Tabcontainer Doctype Cc:
Blocked By: Blocking:


Doctype is not correct handled when using TabContainer?.

Please uncomment the doctype tag in the TabContainer? demo and you will see what I mean.

Also have a look at

Change History (4)

comment:1 Changed 15 years ago by dylan

Component: GeneralWidgets
Milestone: 0.9
Owner: changed from anonymous to bill

comment:2 Changed 15 years ago by koranteng

Owner: changed from bill to koranteng

comment:3 Changed 15 years ago by koranteng

This is actually not a bug - the browsers are behaving correctly as per the css box model spec, when in standards compliance mode, the height of elements of the outermost container is not necessarily the height of the viewport as in quirks mode. To get the desired behaviour one needs a combination of setting the body and html object to have height of 100% and setting min-height judiciously on the tab container, which in any case is a best practice .

Still we can improve our documentation on sizing of widgets and add these recommendations and best practices:

  • use pixels in preference to percentages when styling widgets
  • the most important dimension to style is the width, the browser should be allowed to adjust heights accordingly, unless you are absolutely certain, you can omit heights.
  • if you do specify dimensions for heights be aware that in standards compliance mode the document doesn't fully occupy the viewport unless it is explicitly specified. For example you can add the following style:

html, body {

height: 100%;


  • it is a good practice to set the min-height css attribute on components that are containers such as the tab container

I've submitted an update to the demo file that updates it to follow these practices.

comment:4 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

(In [7475]) Fixes #2215 (see bug for details) Patch from Koranteng (IBM, CCLA on file).

Note: See TracTickets for help on using tickets.