1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default borderlayout question

    borderlayout question


    Ok, I have this code...

    Code:
    	Layout = {
    		init: function() {
               var layout = new YAHOO.ext.BorderLayout(document.body, {
                    north: {
                        split:false,
                        initialSize: 35
                    },
                    south: {
                        split:false,
                        initialSize: 20,
                    },
                    center: {
                        autoScroll: true
                    }
                });
                layout.beginUpdate();
                layout.add('north', new YAHOO.ext.ContentPanel('header', {fitToFrame:true}));
                layout.add('south', new YAHOO.ext.ContentPanel('footer', {fitToFrame:true}));
                layout.add('center', new YAHOO.ext.ContentPanel('content', {title: "body", fitToFrame:false}));
                layout.endUpdate();

    Any content I put into the div "content" is inheriting a setting of 100% width from somewhere. Is this the expected behaviour?

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    The content of the div 'content' (this may get confusing ) shouldn't get adjusted at all. But 'content' (the div) is a block element, and by default block elements expand to fill their container. Does that make sense?

  3. #3
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Note: They expand their width, but not height.

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    elements within the block appear to be getting assigned as blocks as well...

    nice thing about the new framework I'm working with... I don't have much done so it was easy enough for me to throw together a demo for you. I set red borders around the children blocks so you can see how they're getting stretched. Happening in north and south also.

    http://whasit.com/demo.html

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Your child element is a div. A div is a block element. It will automatically grow it's width to fill it's parent element.

  6. #6
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    ugh, i just did a test using basic html and see you're 100% correct, I have no idea why I was thinking a div's width was adjusted to fit that of it's content... Sorry about that Jack.

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    It's much better to ask questions than to just think somethings broken. I am guilty of giving up on something many times rather than asking a question.

Similar Threads

  1. modal dialog and borderlayout inside a borderlayout tab!!!
    By vtswingkid in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Feb 2007, 4:40 PM
  2. Another BorderLayout in a portlet window question.
    By miguel_eduardo in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 21 Feb 2007, 12:14 PM
  3. BorderLayout question
    By j555 in forum Community Discussion
    Replies: 8
    Last Post: 12 Dec 2006, 12:05 PM
  4. Newbie - BorderLayout question
    By ernestlambert in forum Community Discussion
    Replies: 0
    Last Post: 5 Dec 2006, 8:59 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi