PDA

View Full Version : make image autofit on a panel



hrishikeshp19
22 Jun 2011, 2:31 PM
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.

themightychris
22 Jun 2011, 3:55 PM
Use CSS:

.MyPanel img {
max-width: 100%;
max-height: 100%;
}

hrishikeshp19
22 Jun 2011, 4:11 PM
Thanks Chris for prompt reply, could you give me a code sample?

Regards,

Hrishikesh Paranjape