<html>
<body>
At 11:25 AM 26/01/2005, Patrick R. Michaud wrote:<br>
<blockquote type=cite class=cite cite>On Tue, Jan 25, 2005 at 05:35:03PM
+1100, Jonathan Smith wrote:<br>
> Hello<br>
> <br>
> I'd like to make a custom style that defines a width and font-style
<br>
> attribute.<br>
> <br>
> I've tried:<br>
> <br>
> $WikiStyle['pagequote']['width'] = '400';<br>
> $WikiStyle['pagequote']['font-style'] = 'italic';<br>
> <br>
> in both the config and wikistyle.php files but no luck.<br>
> <br>
> Only the font-style attribute gets displayed. I feel like the answer
may <br>
> lie in the wikistylecss[] but I don't understand it.<br><br>
Unfortunately "width" is one of those strange attributes that
occurs<br>
both in CSS and HTML. At the moment (and for historical
reasons)<br>
PmWiki chooses to use it to be able to produce width='...' <br>
attributes in <img> tags, which makes it difficult to also use
it<br>
for <span> styling.<br><br>
At the moment I don't have a good permanent solution to this
problem,<br>
and I can totally understand how this would be desirable or
useful.<br><br>
In the meantime, a good (and safe) workaround is to use CSS classes
<br>
directly rather than trying to program the $WikiStyle array. <br>
Instead of setting $WikiStyle['pagequote'] -- just use<br><br>
$HTMLStylesFmt['pagequote'] = <br>
" .pagequote { width:400;
font-style:italic; }\n";<br><br>
and %pagequote% will then generate <span class='pagequote'><br>
which will do what you want.<br><br>
Pm </blockquote><br>
Hi Patrick<br><br>
Thanks very much for for the reply. My question has now expanded a little
as I've realised that some attributes I need to use only work on block
level elements.<br><br>
Is there a way of defining a style that will get applied to a <p>
tag instead of a <span>? I understand the following example will
work when placed in the content<br><br>
<br>
<pre>%block text-align=right% The text of this paragraph is
right-aligned.
</pre>but what is the equivalent in the wikistyles.php file?<br><br>
Many thanks<br><br>
Jonathan Smith<br><br>
</body>
<br>
</html>