Why is this invulnerable to styling?
I just want to change it's color to #DD4814 but I can't. It's a "share button" btw. What could be the reason?
<span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink() ?>' displayText='Compartir'></span>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">st开发者_运维百科Light.options({publisher:'eb2f12b2-11c6-4013-bf2c-e42dcf3112f5'});</script>
This works for me:
.stButton .sharethis {color:#DD4814}
Usually styling won't work when one selector has precedence over the one you are using. This is called selector specificity and there is a lot of documentation to help you understand how it works.
Because of the nature of the problem, you probably haven't posted enough code to give you an exact answer. But, read the answer to this question: CSS problem - an element only works if its has no parent (using jquery) and http://htmldog.com/guides/cssadvanced/specificity/
To figure out how to apply the answer to your problem, use Firebug, right click on the element, and select "Inspect Element". On the right pane of Firebug should be the Style tab where it will show you which CSS selectors apply to that element. Find the one that has the style you can't overwrite, and make sure your selector is more specific than that.
精彩评论