Perfect, thanks Petko and David!<div><br></div><div>-- Jo<br><br><div class="gmail_quote">On Mon, Mar 16, 2009 at 11:19 PM, DaveG <span dir="ltr">&lt;<a href="mailto:pmwiki@solidgone.com">pmwiki@solidgone.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
<br>
Jo Vermeulen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I was wondering what is the best way to refer to background images in the CSS style sheet for a custom skin? Is it possible to use PHP variables to get the current skin directory in the CSS file (just like how the CSS file is linked in the template)? <br>

</blockquote></div>
You can&#39;t use PHP variables in the css file. However, you typically refer to images using relative paths -- usually including images in the same directory as the css, or a sub-directory. The you can refer to the image from css:<br>

<br>
  #selector { background: url(images/picture.jpg) }<br>
<br>
If you really need to use PHP variables to determine the image path, then you can add styles to the page header using:<br>
<br>
  $HTMLStylesFmt[&#39;mystyle&#39;] = &#39;#selector { background: url(&#39; .$myPHPvariable .&#39;/picture.jpg) }&#39;;<br>
<br>
<br>
 ~ ~ David<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Will this still work when rewrite rules are used (e.g. to rewrite <a href="http://example.com/pmwiki.php/?n=Group.Page" target="_blank">example.com/pmwiki.php/?n=Group.Page</a> &lt;<a href="http://example.com/pmwiki.php/?n=Group.Page" target="_blank">http://example.com/pmwiki.php/?n=Group.Page</a>&gt; -&gt;  <a href="http://example.com/Group/Page" target="_blank">example.com/Group/Page</a> &lt;<a href="http://example.com/Group/Page" target="_blank">http://example.com/Group/Page</a>&gt;)?<br>

<br>
Thanks in advance!<br>
<br>
-- Jo<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
</blockquote>
</blockquote></div><br></div>