Results 1 to 3 of 3

Thread: make image autofit on a panel

  1. #1

    Default make image autofit on a panel

    Hello everyone,

    I am using background image on a panel through html property of the panel like this

    App.somePanel= new Ext.Panel({
    html:'http://somesite/someimage.png'
    ---
    ---});

    I want to make that image autofit to the panel. How can it be done?

    Thanks and Best Regards,

    Hrishikesh Paranjape.

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    369

    Default

    Use CSS:

    .MyPanel img {
    max-width: 100%;
    max-height: 100%;
    }
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  3. #3

    Default

    Thanks Chris for prompt reply, could you give me a code sample?

    Regards,

    Hrishikesh Paranjape

Posting Permissions

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