<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>
&gt; Hello<br>
&gt; <br>
&gt; I'd like to make a custom style that defines a width and font-style
<br>
&gt; attribute.<br>
&gt; <br>
&gt; I've tried:<br>
&gt; <br>
&gt; $WikiStyle['pagequote']['width'] = '400';<br>
&gt; $WikiStyle['pagequote']['font-style'] = 'italic';<br>
&gt; <br>
&gt; in both the config and wikistyle.php files but no luck.<br>
&gt; <br>
&gt; Only the font-style attribute gets displayed. I feel like the answer
may <br>
&gt; lie in the wikistylecss[] but I don't understand it.<br><br>
Unfortunately &quot;width&quot; is one of those strange attributes that
occurs<br>
both in CSS and HTML.&nbsp; At the moment (and for historical
reasons)<br>
PmWiki chooses to use it to be able to produce width='...' <br>
attributes in &lt;img&gt; tags, which makes it difficult to also use
it<br>
for &lt;span&gt; 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.&nbsp; <br>
Instead of setting $WikiStyle['pagequote'] -- just use<br><br>
&nbsp;&nbsp; $HTMLStylesFmt['pagequote'] = <br>
&nbsp;&nbsp;&nbsp;&nbsp; &quot; .pagequote { width:400;
font-style:italic; }\n&quot;;<br><br>
and %pagequote% will then generate &lt;span class='pagequote'&gt;<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 &lt;p&gt;
tag instead of a &lt;span&gt;? 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>