[pmwiki-users] Re: Re: <div> markup suggestions...?

Bronwyn Boltwood arndis at gmail.com
Thu Mar 3 11:32:18 CST 2005


On Thu, 03 Mar 2005 11:34:31 -0500, Neil Herber <nospam at mail.eton.ca> wrote:
> Just so that I can explain this to my authors ... what is a "div" and why
> would I want to have one and how much do I have to pay to get it? :-)

Assuming Pm intends to make it just like HTML, a div will let you
group related text into a block which can be positioned or styled,
depending on what kinds of attributes are applied.

An example: you have an author writing an article, and he wants to
insert a sidebar, the way you see them in magazines.  Currently there
is no elegant way to do this in PmWiki.  But with divs, it's easy. 
For simplicity, we'll assume that the site admin has defined a div
style called sidebar.  An author puts
[%sidebar%
Aenean quis arcu. Vivamus dui. In tincidunt feugiat magna. Vestibulum
pretium augue sit amet pede. Ut consectetuer bibendum sapien.
Suspendisse et sem elementum neque scelerisque rhoncus. Nulla
facilisi. Phasellus in massa. Suspendisse libero nulla, mattis id,
vestibulum dictum, dignissim in, wisi. Pellentesque malesuada, metus
et consectetuer scelerisque, mauris nulla tristique tellus, eu
ultricies odio leo sed nulla. Etiam posuere dapibus ipsum.

Nulla at nulla vel risus volutpat dictum. Donec vitae elit. Aenean
consequat ligula vel nulla. Mauris at diam in nunc viverra mattis.
Vestibulum nonummy sagittis sem. Curabitur eleifend tincidunt risus.
Vestibulum velit. Pellentesque eget nunc nec turpis sodales
scelerisque. Curabitur lectus. Nullam massa wisi, ultricies sit amet,
aliquet sit amet, vulputate et, felis. Nulla ultricies quam eget
velit. Mauris egestas mi eget massa. Ut ante leo, sagittis at, viverra
at, tincidunt ut, enim. Sed mattis nibh eu magna. Integer porttitor
arcu at felis.
%%]

And on the page, that div displays with a pale grey background, black
border, different font, and floats to the right with a 25% width, just
like in a magazine.  Not individually, the way they might with a
paragraph wikistyle, but as *one block*.

Bronwyn



More information about the pmwiki-users mailing list