[thelist] inline css

Max Schwanekamp lists at neptunewebworks.com
Fri Mar 16 01:19:10 CDT 2007

Casey Crookston wrote:
> Yes, I know.  Inline css is a bad idea.   I understand.  But in this
> case, it cant be avoided.... I'll spare you the details.  According to
> W3.org  this should work...

But but but, the details are usually quite helpful.  Why are you able to 
use inline css and nothing else?  Since you're asking for inline 
solutions only, I assume you cannot add/edit any external stylesheets or 
javascript.  But if you can add inline style to an element, can you add 
other elements inline?  A javascript block to add the mouseover style 
change on load of the document? Or an inline <style> block immediately 
preceding the element?
<style type="text/css" media="screen">
a.myclass { /* regular link styles */ }
a.myclass:hover { /* hover styles */ }
<a href="page.html" class="myclass">link</a>

(Icky, but having the benefit that it generally works.)

Max Schwanekamp

More information about the thelist mailing list