I agree with Christof, and a good practice is to add a hasJS class to the body, so you can filter out the css rules for js-only elements. And bring out a better result without js.
On 9/13/07, Christof Donat <[EMAIL PROTECTED]> wrote: > > > Hi, > > > More & more plugins are using CSS to style the layout, this is good, > > but their didn't aware of if user browser don't know javascript, it is > > useless to load the CSS, e.g. thickbox > > > > <script type="text/javascript" src="path-to-file/thickbox.js"></ > > script> > > <link rel="stylesheet" href="path-to-file/thickbox.css" type="text/ > > css" media="screen" /> > > > > can be better: > > > > <script type="text/javascript" src="path-to-file/thickbox.js"></ > > script> > > <script> > > document.write('<link rel="stylesheet" href="path-to-file/ > > thickbox.css" type="text/css" media="screen" />'); > > </script> > > Most userse do have JS active. The overall overhead in bytes downloaded > for > thickbox.css where it is not needed is smaller than the overhead of bytes > you > introduce with your additional script tag for all users. In most cases it > is > better to load the unused stylesheet. > > Christof > -- Joan Piedra || Frontend web developer http://www.justaquit.com/ || http://www.joanpiedra.com/