-
12 Dec 2006 7:22 PM #1
tabpanel overwriting content below it
tabpanel overwriting content below it
I'm trying to implement a tabpanel inside a block in my website, but if I have content immediately after it, the tabs make the tabpanel element bigger, while not pushing the content below them down, instead, over writing a portion of them.
Here's some code
Here's a link where you can see itCode:var profExplain = YAHOO.ext.DomHelper.append('mainViewWest', {tag: 'div', id: 'profileExplain'}, true); profExplain.update('test'); YAHOO.ext.DomHelper.append('mainViewWest', {tag: 'div', id: 'profileView'}); YAHOO.ext.DomHelper.applyStyles('profileView', {height: '100px'}); var profileTabs = new YAHOO.ext.TabPanel('profileView'); YAHOO.ext.DomHelper.append(document.body, {tag: "div", id: "test1"}); profileTabs.addTab('test1', "test"); var testappend = YAHOO.ext.DomHelper.append('mainViewWest', {tag: 'div', id: 'test2'}, true); testappend.update('test 2');
http://whasit.com/ci/ucp Note: you have to click on "My View" to see exactly what I'm talking about.
The "test 2" is there, you just can't see it because it's under the tab panel. Looking at the generated source in firebug, you can see it does exist.
Sorry if this is an easy fix, I'm averaging 3-5 hours of sleep tops all this month. I've been banging at this for a while, but my brain isn't quite all there.
-
13 Dec 2006 12:31 AM #2
and north has an initialHeight of 50. It will be 50 pixels high. You won't be able to see any tabpanel.Code:headerTabs = layout.add('north', new YAHOO.ext.NestedLayoutPanel(headerLayout, {fitToFrame:true}));
Whay have you got a complex entity like a layout in a header section????
-
13 Dec 2006 4:16 AM #3
actually the header works fine

What you're referring to is the nav bar at the top. That center region gets tabs updated to it depending on the login status of the user, and eventually, which page they are on. If you want to see an example feel free to make an account, the database gets reset with my local copy when I update the site.
The problem I'm having is in the 2 large columns in the view created when you click "My View" on the sidebar in the provided link. I'm trying to populate those with a collection of views and tabpanels. The tabpanels are presenting the aforementioned problem though.
-
13 Dec 2006 4:21 AM #4
I added more text to the testdiv to demonstrate better the problem, now you can visually see the overlap.
-
13 Dec 2006 6:18 AM #5
appears my host has some database issues lately :| the joys of shared hosts
however, in theory I think I have a solution I'm hoping to check soon. I think it might just be a simple case of I need to repaint the contentpanel element
-
13 Dec 2006 6:23 AM #6
-
13 Dec 2006 6:36 AM #7
The tab control isn't overlapping the text. If you open it in firebug and mouse over them you will see what I mean.
The problem is the tab body element has no height set (it's auto) and you set a height on the tab container (100px). This causes the body element to overflow the container element (as per w3c spec) and overlap the text.
What you want to do is set the height of the body element (which is what is overflow auto), not the tab container OR you can call syncHeight() on the TabPanel and it will make sure all the heights are correct automatically (as long as the body is overflow auto or hidden).
-
13 Dec 2006 3:32 PM #8
I got it with the syncHeight, which I had tried before... the catch? I never activated the tab so was confused cause I wasn't seeing the content. I need sleep :p Thanks Jack.
Similar Threads
-
tabPanel.activate vs tabPanel.activateTab
By jon.whitcraft in forum Community DiscussionReplies: 2Last Post: 10 Sep 2007, 11:21 AM -
tabpanel - how change content
By rudy in forum Ext 1.x: Help & DiscussionReplies: 7Last Post: 20 Feb 2007, 6:31 AM -
How to retrieve a Tabpanel from another Tabpanel?
By ines in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 1 Feb 2007, 8:35 AM -
TabPanel: loading content w/out AJAX
By mapo in forum Ext 1.x: Help & DiscussionReplies: 6Last Post: 9 Jan 2007, 7:27 AM -
tabpanel content and javascript
By jbowman in forum Ext 1.x: Help & DiscussionReplies: 8Last Post: 12 Sep 2006, 7:43 PM


Reply With Quote