Replacing class="alignright" etc Was: Re: [wp-hackers] Linking stylesheet to RSS feeds

Lynne Pope lynne.pope at
Wed Jun 17 13:59:02 GMT 2009

2009/6/17 Eric Marden <wp at>

> On Jun 17, 2009, at 3:34 AM, Lynne Pope wrote:
>  Inline styles apply only to the element they are set on. They take
>> precedence over everything else in the cascade. Its impossible to style
>> pseudo-elements and -classes with inline styles and impossible to override
>> them in external CSS.
> You can override them with the !important flag, but I wouldn't really
> recommend it unless required.

True - I should have said, "impossible to do without messing a lot of other
things up" ;)

The !important modifier does indeed override inline styles - in browsers
that support it. IE6 doesn't and IE7 can't handle it if its used with
elements, eg, I routinely use :
#commentform input[type="submit"], #commentform input[type="reset"]{
Any !important modifier used to target HTML elements is ignored by IE7.

Using the modifier also overrides user styles and browser styles, which can
have a serious impact on accessibility.

Like Simon, this is one of my pet peeves about plugins. I strip the CSS from
all plugins that I use and this often results in me having to hack the code,
just to get the plugin to work with my themes. Best practise should be NO


More information about the wp-hackers mailing list