As an aside to this topic I find the it handy to include a "css" method call in the autohandler to enable page specific styles and/or stylesheet links when needed (since they must appear in the head, but the <head> is generated by the autohandler). This helps cut down on clogging the main stylesheet with lots of page specific nits.
In the autohandler: <html> <head> <title><& SELF:title &></title> <link rel="stylesheet" type="text/css" href="/css/default.css"> <& SELF:css &> </head> <body> % $m->call_next; </body> </html> <%method css></%method> Then in a page needing specific CSS (either in a <style> block or as another link) simply override the <%method css>: <div>My example page</div> <%method css><link rel="stylesheet" type="text/css" href="/css/ example.css"></%method> or <div>My other example page</div> <%method css> <style type="text/css"> div { border: solid 2px red; } </style> </%method> BTW I find Mason is great for generating CSS--particularly when you need one color to appear in multiple places (e.g. as a background of one element and the border of another). On Aug 1, 2006, at 1:11 PM, Raful Mr Mitchell H wrote: > Hey that did the trick!! :-) > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// > www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <title>Management App</title> > <LINK rel="stylesheet" href="css/mystyles.css" type="text/css"> > </style> > </head> > > > Thanks, > > Mitch > > -----Original Message----- > From: John Peacock [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 01, 2006 4:04 PM > To: Raful Mr Mitchell H > Cc: John Romkey; Mason-Users (E-mail) > Subject: Re: [Mason] external stylesheet > > > Raful Mr Mitchell H wrote: >> No luck, i tried everything I could think of. NO html in the >> style sheet. I can get to the style sheet via the browser and the >> link statement is there see below, again, the top of the page to </ >> head> is the autohandler: > > Put your stylesheets in a directory /css/ and tell Apache not to send > that directory to Mason: > > <Location /css> > SetHandler default-handler > </Location> > > Change your autohandler to reference the absolute address, instead of > the relative address. Your style sheet cannot go through the > autohandler itself, because that will cause HTML headers to be sent. > > HTH > > John > > -- > John Peacock > Director of Information Research and Technology > Rowman & Littlefield Publishing Group > 4501 Forbes Boulevard > Suite H > Lanham, MD 20706 > 301-459-3366 x.5010 > fax 301-429-5748 > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users