From: dorayme on
In article
<no.email-48A285.09352512052010(a)news1.chem.utoronto.ca>,
David Stone <no.email(a)domain.invalid> wrote:

> In article <hse7s1$7jh$1(a)speranza.aioe.org>,
> Bwig Zomberi <zomberiMAPSONNOSPAM(a)gmail.com> wrote:
>
> > If you want no padding, specify a unit.
> > padding: 0px;
> >
> > If you want to inherit padding, use no unit.
> > padding: 0;
>
> Are you sure about that?

Perhaps Zomberi is talking a fix for a bug or inability in IE
only?

--
dorayme
From: Bwig Zomberi on
David Stone wrote:
> In article<hse7s1$7jh$1(a)speranza.aioe.org>,
> Bwig Zomberi<zomberiMAPSONNOSPAM(a)gmail.com> wrote:
>
>> If you want no padding, specify a unit.
>> padding: 0px;
>>
>> If you want to inherit padding, use no unit.
>> padding: 0;
>
> Are you sure about that? CSS 2.1 8.4 Padding properties
> doesn't mention units, but it does say that the value
> of the shorthand property 'padding' is not inherited
> unless you specify it:
>
> ’padding’
> Value:<padding-width>{1,4} | inherit
> Initial: not defined for shorthand properties
> Applies to: all elements
> Inherited: no
> Percentages: refer to width of containing block
> Media: visual
>
> Section 4.3.2 on length merely indicates that units are
> optional for any zero length, not that this implies inheritance.

I did not realize "inherit" had special meaning. If you use

padding: 0;

then the regular or default padding is used.


If you use

padding: 0px;

then padding is set to no padding.



That is if the default padding for an img class was

padding: 30px 20px 20px 40px;

and in a img element you used

padding: 0 0px 10 10px;

then top padding is 30px even though you used 0. Right padding will be
0px because units was specified. Bottom padding will be 10px as pixels
is default unit. Left padding will be 10px.

In the revised code, I posted earlier, I have specified units and that
resolves the problem. Without units, default padding is retained, which
is why the OP encountered unwanted space.






--
Bwig Zomberi

From: Bwig Zomberi on
Bwig Zomberi wrote:
> David Stone wrote:
>> In article<hse7s1$7jh$1(a)speranza.aioe.org>,
>> Bwig Zomberi<zomberiMAPSONNOSPAM(a)gmail.com> wrote:
> I did not realize "inherit" had special meaning. If you use
>
> padding: 0;
>
> then the regular or default padding is used.
>
>
> If you use
>
> padding: 0px;
>
> then padding is set to no padding.
>
>
>
> That is if the default padding for an img class was
>
> padding: 30px 20px 20px 40px;
>
> and in a img element you used
>
> padding: 0 0px 10 10px;
>
> then top padding is 30px even though you used 0. Right padding will be
> 0px because units was specified. Bottom padding will be 10px as pixels
> is default unit. Left padding will be 10px.
>
> In the revised code, I posted earlier, I have specified units and that
> resolves the problem. Without units, default padding is retained, which
> is why the OP encountered unwanted space.

I checked this and found that it does not work that way. My bad. I read
a long-forgotten article that suggested something along these lines. May
be I understood it in a wrong way.

I guess for old versions of IE, if you use units, it works. Otherwise,
it gets confused.


--
Bwig Zomberi
From: rf on
Bwig Zomberi wrote:
> Bwig Zomberi wrote:
>> David Stone wrote:
>>> In article<hse7s1$7jh$1(a)speranza.aioe.org>,
>>> Bwig Zomberi<zomberiMAPSONNOSPAM(a)gmail.com> wrote:
>> I did not realize "inherit" had special meaning. If you use
>>
>> padding: 0;
>>
>> then the regular or default padding is used.
>>
>>
>> If you use
>>
>> padding: 0px;
>>
>> then padding is set to no padding.
>>
>>
>>
>> That is if the default padding for an img class was
>>
>> padding: 30px 20px 20px 40px;
>>
>> and in a img element you used
>>
>> padding: 0 0px 10 10px;
>>
>> then top padding is 30px even though you used 0. Right padding will
>> be 0px because units was specified. Bottom padding will be 10px as
>> pixels is default unit. Left padding will be 10px.
>>
>> In the revised code, I posted earlier, I have specified units and
>> that resolves the problem. Without units, default padding is
>> retained, which is why the OP encountered unwanted space.
>
> I checked this and found that it does not work that way. My bad. I
> read a long-forgotten article that suggested something along these
> lines. May be I understood it in a wrong way.

Glad you cleared that up. I was just about to refute your statements.

> I guess for old versions of IE, if you use units, it works. Otherwise,
> it gets confused.

What we are seeing is a bug in IE, one of the hundreds. If specifying units
on a zero value fixes it then then that also is a bug.


From: David Stone on
In article <dorayme-E9B314.08170113052010(a)news.albasani.net>,
dorayme <dorayme(a)optusnet.com.au> wrote:

> In article
> <no.email-48A285.09352512052010(a)news1.chem.utoronto.ca>,
> David Stone <no.email(a)domain.invalid> wrote:
>
> > In article <hse7s1$7jh$1(a)speranza.aioe.org>,
> > Bwig Zomberi <zomberiMAPSONNOSPAM(a)gmail.com> wrote:
> >
> > > If you want no padding, specify a unit.
> > > padding: 0px;
> > >
> > > If you want to inherit padding, use no unit.
> > > padding: 0;
> >
> > Are you sure about that?
>
> Perhaps Zomberi is talking a fix for a bug or inability in IE
> only?

It appears from else-thread that that is indeed the case.
I wonder which versions of IE that applie(d|s) to?