[Zope] ZPT and CSS

Tino Wildenhain tino at wildenhain.de
Sun Nov 30 08:06:59 EST 2003


Hi Andre,

Andre Meyer wrote:
> Hi Zopers
> 
> Trying to improve my ZPT pages I wanted to make use of Cascading Style
> Sheets (CSS). While the styles in my CSS file are properly rendered when
> I open the HTML file directly in the browser (Mozilla 1.4.1) they
> completely disappear when I view the same page through Zope!!!
> What is Zope doing? May it be that the CSS cannot be located because of
> the base url inserted by Zope?

Beside possible and intended by you manipulations of the HTML
structure by means of TAL there is no difference between
The HTML you put in and the HTML you get out.

After all, you can use "view source" in your web browser to check.

As for links to embedded resources (images, scripts, styles)
you would preferably use root-relative links. That is:
links starting with /
Its not because it would not work - since it would work
with relative links quite well - you avoid multiple
versions appear in caches because of Zopes
acquisition.

So, just check what you put in and what you really get back.
See if the mime-type of your CSS file is correct or
change it otherwise.

We all use CSS with Zope since its definitively the way to go :)

Regards
Tino Wildenhain




More information about the Zope mailing list