PDA

View Full Version : Display a banner on a page



sj_tt6
8 Aug 2012, 3:26 PM
Hi,

I want to display a banner on my web page. I create a view port and I add to the top tool bar a combo box on the left and a Signout button with icon on the right. I look for a way to add a banner in the center with some text and logo. How do I do it? Or is there any other way to do it instead of tool bar?

Thanks,

vietits
8 Aug 2012, 4:58 PM
Try this:


Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'center',
html: '<h1 class="x-panel-header">Page Title</h1>',
autoHeight: true,
border: false,
margins: '0 0 5 0'
}, {
region: 'north',
height: 60,
layout: 'hbox',
items: [{
xtype: 'combobox'
},{
xtype: 'tbfill'
}, {
xtype: 'image',
src: 'images/banner.jpg',
height: 60,
width: 900
},{
xtype: 'tbfill'
},{
xtype: 'button',
text: 'button 2',
}]
}]
});

sj_tt6
10 Aug 2012, 8:37 PM
Thank you for your sample! I can display the banner now.

Cheers,

luisparada
11 Aug 2012, 8:24 AM
Don't forget to mark this answer as "Best Answer", that way you will help improve the forum.