View Full Version : Viewport padding is not being applied correctly

15 Nov 2009, 9:58 AM
I want to specify a 10px padding in a viewport all the way around. However, it only seems to be applying the padding for X and Y, but not Right and Bottom. Here is the code:

vp = new Ext.Viewport({
layout: "fit",
style: {
padding: "10px 10px 10px 10px"
var container = new Ext.Panel({


The panel (container) is padded 10px from X and Y of the viewport, but not the bottom in FireFox and both bottom and right in IE6.

Is this a bug??

26 Feb 2010, 1:18 AM
Youn have to introduce style in items section of viiew port.


Ext.BLANK_IMAGE_URL = '/javascripts/ext-3.1.0/resources/images/default/s.gif';
viewport = new Ext.Viewport({
title:'Test App'
,items:[{xtype:'panel', border:false, style:'padding:10px', html:'test'}]