[richfaces-issues] [JBoss JIRA] Commented: (RF-9126) TabPanel - inconsistent tab height on ie 7 if some labels wrap

Val Blant (JIRA) jira-events at lists.jboss.org
Tue Mar 29 22:53:37 EDT 2011


    [ https://issues.jboss.org/browse/RF-9126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12592566#comment-12592566 ] 

Val Blant commented on RF-9126:
-------------------------------

I looked into why this problem is happening and came up with a work around. Hopefully this will be useful to others.

The reason why the tabs end up being a different size, is b/c RichFaces tabPanel is trying to use _style="height: 100%"_ on tables to lay out the tabs. However, this will only work in Quirks Mode. In Standards Mode, the height is calculated as follows, according to the [CSS Spec|http://www.w3.org/TR/CSS21/visudet.html#the-height-property]:

bq. The percentage is calculated with respect to the height of the generated box's containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to 'auto'.

In other words, since we are not specifying the height explicitly and we are relatively positioned, _"height: 100%"_ is ignored!

I came up with a JavaScript work around that fixes the problem by first allowing the browser to layout the table and then finding the tallest TD and explicitly assigning that height to all other TDs.

Just include _tabPanelFix.js_ in your page and the tabs should become the correct height.

> TabPanel - inconsistent tab height on ie 7 if some labels wrap
> --------------------------------------------------------------
>
>                 Key: RF-9126
>                 URL: https://issues.jboss.org/browse/RF-9126
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.3.1
>         Environment: Windows XP Windows Exploder 7 and 8
>            Reporter: Joe Knudsen
>            Assignee: Nick Belaevski
>             Fix For: 3.Future
>
>         Attachments: tabPanel.png
>
>
> See issue https://jira.jboss.org/browse/RF-1011
> Seems to be a problem in 3.3.1 also.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list