[Zope] Using of Structured Text with CSS

Brad Clements bkc@murkworks.com
Wed, 3 Oct 2001 09:54:28 -0400


On 2 Oct 2001 at 19:22, Dirk Datzert wrote:

> > I want to use the <dtml-var xyz fmt=structured-text> Tag in connection
> > with stylesheets (css). The problem is that the stylesheets take no
> > effect when the structured-text is activated.  The result is always
> > standardtext without any stylesheets only with the elements of
> > structured-text. Is there any possibility to use structured-text and
> > stylesheets together.

I'm using STX with PageTemplates and CSS, but you can achieve the same results 
with dtml.

Essentially the STX output is wrapped in a DIV with a class statement, like this:


       <div class="StructuredText" 
                    tal:content="structure python:here.StxToHTML(src=here,pfunc=path)" />

(pfunc is my own thing.. passing the path page template function to my external method 
so that :img: tags can be specified using Paths.. then I call tag() on them, original stx 
conversion just takes the img: part as a direct URL, which doesn't make sense for me)

Anyway, I'm using ZStyleSheets like this:

.StructuredText {
	font-family: "Arial", sans-serif;
}

You can add more tags in the .StructuredText selector, like H, P, etc.. I just don't 
happen to override those.

Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements