You can always put a <link> tag into your html body to include your external css file. I'm pretty sure it would override those linked in the head.
that should make your css for the widget re-usable. you may put all overrides into that external file. cheers, Virgil http://www.jampmark.com On Fri, Jan 23, 2009 at 11:34 PM, Dan Gayle <danga...@gmail.com> wrote: >>> I believe you are wrong. There are valid reasons for adding inline >>> styles. >>> For instance, when creating a plugin or widget for a CMS or other managed >>> site, often the CSS and/or the HTML cannot be modified. > > On Jan 23, 2009, at 12:52 AM, david wrote: >> >> If you can't modify the HTML, you can't add inline styles, either. > > Not necessarily. Many plugins, let's say a shortcode plugin for Wordpress or > similar, inserts html into a post's content area. I've had to do this on a > few occasions. For instance, I had a specific pull-quote shortcode style > that made use of blockquotes and cites. The content div had something like > this declared: > > #content blockquote{margin:1em;padding:1em;background-color:#eeeeff;} > > In this case, everything about that declaration needed to be changed. No > matter how hard you try, unless you have access to the main CSS, you cannot > over-ride that style block with classes only. And since this widget will be > used in sites where the main content div's id cannot be predetermined, the > only way to guarantee that the styles you need to make it use inlines. > > That is, unless I am completely wrong, in which case I would love to hear an > alternate solution. ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/