How is the * CSS rule more specific than a class or ID style rule?

The * is a universal selector and overriding the settings on #profileMessageBoxHeader. It's the same as manually setting BODY, H1, P, TABLE, TR, TD, TH, PRE, UL, LI, ETC. For more information on it and how it can circumvent inheritance Eric Meyer has a good article.

The * is a universal selector and overriding the settings on #profileMessageBoxHeader. It's the same as manually setting BODY, H1, P, TABLE, TR, TD, TH, PRE, UL, LI, ETC. For more information on it and how it can circumvent inheritance, Eric Meyer has a good article.

Apply the following and it should work: #profileMessageBoxHeader p { color: #FFF; } Sample: jsfiddle.net/x7AnM.

As far as I know an element outweighs an id (search CSS weight for more info) and * specifies (all) elements, so add the element div in your rule, e.g. Div#my_id.

Thanks for giving me the right term (weight) for how CSS decides which rules go where. As soon as I can convince google that I don't want 'font-weight', I should be golden... – RonLugge Sep 27 at 22:03 1 Use this link :) webteacher. Ws/2008/05/19/… – Kevin E.

Sep 27 at 22:06 Thanks. I really need to practice my google-fu more... But links are so much better! – RonLugge Sep 27 at 22:07 Another, more accurate term is CSS Specificity.

Weight is the nontechnical term that has been pseudo-standardized. – Fuzzical Logic Sep 27 at 21:56.

Because the * is being applied to the . If you change your CSS to: #profileMessageBoxHeader { background:url('images/profileMessageHeaderGradient. Png') repeat-x #208ff6; height:178px; border-radius:10px 10px 0px 0px; } #profileMessageBoxHeader p { color:#fff; } ...then it should work.

Because the "*" matches ANY element. So it's matching the p tag within #profileMessageBoxHeader and overwriting the styles applied to the parent container (#profileMessageBoxHeader). If you changed the style to be #profileMessageBoxHeader p{ color: #fff; } you'd get white text.

Or if you changed the markup to remove the p tag, maybe Your Text that would also result in white text.

There is my little try to illustrate cascade of Your two styles. Rule of parent Rule * Rule of parent Rule * Rule of #profileMessageBoxHeader Rule of parent Rule.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions