[thelist] Styling Applications embedded in templates

Scott Blanchard octigonuser at hotmail.com
Mon Feb 9 11:35:22 CST 2004


In a template based publishing system, applications are routinely inserted 
into a main content area or div of the template. These applications are 
usually fully self contained applications that are merely "executed" by the 
application server and their output is written inline to the page in the 
container element. These applications do not contain head, html or body 
tags, since the template in which they are loaded already has that 
informtion.

My question goes to how to best include styling directives for these 
applications. Each application may require unique styling, therefore it is 
not advisable to assume that an application global stylesheet can be 
inserted into the containing template's HEAD section. Although this would 
possibly be the most optimal solution.

Is it permissable to link to a stylesheet outside of the body tag? This 
would allow each application to contain a pointer to its stylesheet as the 
first line of its code like so:

Template source code follows...

<html>
<head>
</head>
<body>
This is the first line of the template's body section
<div id="myApplication">
<link rel="stylesheet" href="scripts/application.css" type="text/css" />
This is the second line of the executed application code. The app will be 
styled by the application.css file instantiated on the first line of the 
containing div.
</div>
</body>
</html>

_________________________________________________________________
Get some great ideas here for your sweetheart on Valentine's Day - and 
beyond. http://special.msn.com/network/celebrateromance.armx



More information about the thelist mailing list