http://www.ambiguism.com/test/index2.html

> I mainly curious as to how the blow universal selector(s) affect elements
> on the page:
>
> .col * { margin-left: 15px; margin-right: 15px; }
> .col * * { margin: 0; }
>


The * is a universal selector - it selects everything.
In the first case it adds a 15px margin to all childs of the .col. In your
case that would be the <p>'s within <div class="col">.

The second one sets margins to 0 of any grandchilds of .col, say if you
where to embed a <img> or a <span> within the <p>, those wouldn't have
margins.

I'm not sure how useful this last one is though, I prefer setting a
* { margin: 0; padding: 0; }
and then spesify anything and everything myself, mainly because different
user agents have inconsistant default paddings and margins.

However, the .col * {margin: 'x'} instead of using the seemingly equal .col
{padding: 'x'} is a good idea for avoiding problems with certain old
browsers, although I haven't tested this myself.

Eystein
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to