[css-d] PROBLEM SOLVED: universal selector horror

2006-10-17 Thread Raymond Rodriguez
Sorry guys but I think I got this one licked. I changed things like

body#infoSidebar p {
padding: 10px;
}

to

*#infoSidebar p {
padding: 10px;
}

I'm very pleased that it works now but now I'm confused as to why it  
worked while the first instance didn't. Could anyone shed some light?

Thanks,

Raymond
__
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/


Re: [css-d] PROBLEM SOLVED: universal selector horror

2006-10-17 Thread Richard Grevers
On 10/17/06, Raymond Rodriguez [EMAIL PROTECTED] wrote:
 Sorry guys but I think I got this one licked. I changed things like

 body#infoSidebar p {
 padding: 10px;
 }

 to

 *#infoSidebar p {
 padding: 10px;
 }

 I'm very pleased that it works now but now I'm confused as to why it
 worked while the first instance didn't. Could anyone shed some light?

spaces have meaning in CSS.
unless you were trying to style body id=infoSidebar, your first
attempt woul not have selected anything:
foo#bar selects an element foo with an id of bar
foo #bar selects any element which is a descendent of foo with an id of bar
so if you have
body
 div
 div id=infoSidebar
 pboo!/p
/div
/div
your div infosidebar is a descendant of body (but not its direct child)
The * is unnecessary in your second example.

-- 
Richard Grevers, New Plymouth, New Zealand
Hat 1: Development Engineer, Webfarm Ltd.
Hat 2: Dramatic Design www.dramatic.co.nz
__
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/