[pmwiki-users] relative position style

Mark Lee mark.lee.phd at gmail.com
Wed May 8 09:23:16 CDT 2013

What I am trying to accomplish with the background image is something like
google maps but on a much smaller scale for my garden. I have coded this
already in html, but I was wondering if pmwiki markup supports this
function directly. Let me describe the situation:

1. Each plant in my garden has a page.
2. Outside of pmwiki, I sketch a garden map in a drawing app, and save it
as a jpg file.
3, On the page of each plant, I display the garden map. In html I create a
div and make the map the background image so that I can add information on
top of it.
4. The X and Y position of the plant on the map is contained on the page.
Lets say a tree is located at map coordinates <100,250>. I was thinking to
use the markup (:xposition 100:) (:yposition 250). I could then use this
information in what ever way is supported by pmwiki markup via
{$:xposition} and {$:yposition}.
5. In html, I am able to place a marker using styles. For example, if I
want a marker "1" at position <132,165> I use <plant
style="position:relative; left:132px; top:165px">2</plant></p>. Is this
possible in pmwiki?


On Wed, May 8, 2013 at 2:12 AM, Petko Yotov <5ko at 5ko.fr> wrote:

> Mark Lee writes:
>> I want to have a background image and then position text using page
>> variables. Is this possible with PMWiki? Here is what I am doing with html
>> and I am not sure it is possible with PMWiki:
> ...
>  <div style="background-image:url(ht**tp://www.tizag.com/pics/htmlT/**
>> background.jpg);padding:0px;**width:150px;height:200px;**border:1px<http://www.tizag.com/pics/htmlT/background.jpg);padding:0px;width:150px;height:200px;border:1px>solid black;">
> I'd advise against enabling the background-image style if it is possible
> to define the styles in the pub/css/local.css or
> pub/skins/yourskin/skin.css files.
> For example, in pub/css/local.css or in pub/css/Group.Page.css define a
> class for the div element that will have a background image, and in the
> wiki page just apply the class attribute.
>  <p>
>> <plant style="position:relative; left:-2px; top:-20px">1</plant>
>> <plant style="position:relative; left:132px; top:165px">2</plant></p>
> To enable styles other than the default ones, add something like this in
> config.php:
>  $WikiStyleCSS[] = 'position|left|top';
> I assume that you have custom markup for the custom <plant> tag.
> Petko
> ______________________________**_________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/**mailman/listinfo/pmwiki-users<http://www.pmichaud.com/mailman/listinfo/pmwiki-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130508/443b5026/attachment.html>

More information about the pmwiki-users mailing list