PDA

View Full Version : xtype:'fieldset' with border = false but inside padding still showing



xjpmauricio
22 Oct 2010, 5:25 AM
Hi, i have a problem with a xtype:'fieldset'; I've removed the border (border:false) but the
inside padding (or margin!?) is still showing;
How can i fix this?

Condor
22 Oct 2010, 5:31 AM
Why are you using a fieldset when you are not using any of the fieldset features (title, checkbox, border etc.)?

In your case a plain xtype:'container' would do just as well!

xjpmauricio
22 Oct 2010, 5:38 AM
Yes, i'm using a fieldset because of collapse & expand methods, etc. The fields show, depending on options selected.

It's got to be a fieldset. :-(

Animal
22 Oct 2010, 5:41 AM
Override the CSS padding rules of the body then.

xjpmauricio
22 Oct 2010, 5:48 AM
Override the CSS padding rules of the body then.

i did this but it didn't work:

{
xtype:'fieldset',
bodyStyle:'padding:0px!important;',

Animal
22 Oct 2010, 5:51 AM
!important is invalid for inline style.

Animal
22 Oct 2010, 5:53 AM
But its style you need to set. For some reason they style the outer element, not the body (I think this is a bug)

xjpmauricio
22 Oct 2010, 5:55 AM
It worked like this:

style: 'padding:0px!important;margin:0px!important;',
border: false,

Thanks!!!

Animal
22 Oct 2010, 6:00 AM
This works:

style: 'padding:0;margin:0'

Zero size requires no units.

xjpmauricio
22 Oct 2010, 6:02 AM
This works:

style: 'padding:0;margin:0'

Zero size requires no units.

Final Version:
style: 'padding:0;',
border: false,

Condor
22 Oct 2010, 6:09 AM
But its style you need to set. For some reason they style the outer element, not the body (I think this is a bug)

No it's not. <fieldset> margins and paddings behave completely different on various browsers, so you can't use one single solution.

Animal
22 Oct 2010, 6:11 AM
It's the outer el that is the <fieldset> The body is a plain <div>

I'm suggesting they should apply "reset" styling to the outer <fieldset>, and their stylesheets should style the body to give it some "shape".

Condor
22 Oct 2010, 6:14 AM
In IE a fieldset without padding still has a 10px top padding, so you would need to compensate for that.

xjpmauricio
22 Oct 2010, 6:15 AM
It's works the same on all browsers. Just checked it!

xjpmauricio
22 Oct 2010, 6:22 AM
In IE a fieldset without padding still has a 10px top padding, so you would need to compensate for that.

Thanks a lot!!!

xjpmauricio
22 Oct 2010, 6:23 AM
It's the outer el that is the <fieldset> The body is a plain <div>

I'm suggesting they should apply "reset" styling to the outer <fieldset>, and their stylesheets should style the body to give it some "shape".

Thanks a lot!!!