Re: [css21-selectors] Interpretation of attribute selector

"Belov, Charles" <Charles.Belov@sfmta.com> wrote:
> >    p[style="text-align: justify;"], p[style="text-align:justify;"] {
> >      text-align: left;
> >    }
> > 
> > This will obviously not work if the @style has more stuf in 
> > it, etc, but neither did your original selector above.
> 
> Alas, it appears not to work at all, producing justified text in
> Firefox 3.6.3 Windows, Safari 4 Windows and Internet Explorer 8.
> 
> Please see http://www.sfmta.com/cms/testSelectorD.htm .

You need to add an !important.  (A user style sheet would not need
that, but style="..." trumps all normal declarations from document 
style sheets.)

zw

Received on Wednesday, 2 June 2010 18:35:37 UTC