[pmwiki-users] Custom Markup for a Button

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 12 14:33:10 CDT 2007


On Wed, Sep 12, 2007 at 02:42:39PM -0400, Josh Miller wrote:
> 
> Hello:
> 
> I am trying to convert the following HTML into Markup:
> 
> <div id=Button><div><a href="http://www.yahoo.com">Yahoo</a></div></div>
> 
> So it looks like this:
> (:button www.yahoo.com :) or (:button [[Main.HomePage|Go Home]] :)

Try a wikistyle instead -- see http://www.pmwiki.org/wiki/Test/Button .

On pmwiki.org, I set pub/css/Test.Button.css to contain:

  .button a {
        color: #FFF;
        font-size:10px;
        font-family:verdana;
        font-weight:bold;
        text-decoration: none;
        text-align: center;
        border:2px outset blue;
        background-color:#009;
        display: block;
        width: 160px;
        padding: 2px 5px;
        margin: 3px 0px 2px 20px;
  }

  .button a:hover {
        background-color: #006;
        color:#FF0;
        padding-left:4px;
        border:2px inset #009;
  }

You can of course get the same effect site-wide by placing
the above in pub/css/local.css .

Also note that if you use a custom markup that has "id=Button"
in it, then HTML restricts the page to having only one such 
button in it, as every id= value must be unique within a page.

Pm




More information about the pmwiki-users mailing list