[pmwiki-users] Put a border around an image

Patrick R. Michaud pmichaud at pobox.com
Fri Jan 28 08:59:23 CST 2005


On Thu, Jan 27, 2005 at 09:38:10AM -0900, Chris Lott wrote:
> How can I put a 1 pixel border around an image uploaded with Attach: ??

The quick answer is that there's not a good way to do this at the
moment.  

In PmWiki 1 it was relatively easy to do this because the <img ...>
tags used the HTML 4 "border=" attribute, which could then be
overridden by a "style=" attribute within the same tag.

In PmWiki 2.0.beta14, we changed the default output of <img ...>
tags to use "style='border:0px'" instead of "border='0'", because
the border= attribute is not available in XHTML.

Unfortunately, in doing so this makes it difficult for PmWiki to add
more style= attributes to <img ...> tags because they already have
a style attribute.  (I've never seen clear documentation as to whether
it's legal for an attribute to be specified multiple times in a single
HTML tag, so I've assumed it's not legal.)

Of course, the real solution is to have PmWiki be smart enough to
find any existing style attributes in an <img> tag and replace them
accordingly, but that's a bit tricky.  Still, it's something that ought
to be done so I'll put it on the ToDo list.

Pm




More information about the pmwiki-users mailing list