Results 1 to 2 of 2

Thread: Viewport behavior within a div

  1. #1

    Default Viewport behavior within a div

    I have a div on my page with a fixed height and width. I would like to render an Ext.panel.Panel into this fixed div and have its height and width fill the div. Of course the multitude of posts asking for something like this indicate that there is no 'fit' on Panel (too bad), or to use Viewport (this panel will be inside a div, not body), or to use a layout manager (I am using border layout in my panel).

    If I give the panel the same height/width values as my div, it looks fine. Is there a way to programmatically accomplish this? I am not developing an entire ExtJS application; I only want to use certain components in a web page.

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,102
    Answers
    113

    Default

    one simple way to do this is to use a panel with width and height set to '100%' and renderTo: 'divId'. this will make the panel expand and occuppy the complete height and width of your div without having to assign it a fixed height and width in pixels etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •