[pmwiki-users] Re: Div Markup + Wiki Styles for Image Placement

Patrick R. Michaud pmichaud at pobox.com
Sat Jul 9 09:33:39 CDT 2005


On Sat, Jul 09, 2005 at 02:57:57AM -0700, H. Fox wrote:
> On 7/9/05, Algis Kabaila <akabaila at pcug.org.au> wrote:
> > > combined with %align=right% and %align=right% seems to work nicely in
> > > PmWiki 2.  Those margin values were arrived at through experimentation
> > > in the version 1 wiki.
> [snip]
> > "combined with %align=right% and %align=left%"  -- no?  Would %align=center%
> > work, too?
> 
> It seems not to work for %align=center%, but I only need left and
> right for what I want to accomplish ...

HTML doesn't define an %align=center% for images (and browsers would
have difficulty getting text to "flow" around a center-aligned image).
But %center% works for centering an image if you aren't interested
in flowing text around it.

> ps:  Does anyone have a good reason *not* to make the following line
> (possibly with pixel values adjusted) part of the distributed
> pmwiki.css stylesheet?  IMHO doing so would put reasonable default
> margins around images in PmWiki pages.
> 
> #wikitext img {margin-left:5px; margin-right:8px;  margin-bottom:1px;
> margin-top:4px;}

Two potential problems:  (1)  As written above the margins are no
longer "defaults" but mandatory settings -- there's no simple way
for an author to change or eliminate the images' margin settings,
and (2) it's too general, it puts margins on images (especially
non-floating) where they aren't wanted.  So, if a site is using
wikismileys, or images to visually tag links to external sites,
then those images get margins added to them as well.

I suspect the answer is going to be that we predefine %imageleft%
and %imageright% wikistyles that provide appropriate margins
and get authors to use those.

Pm



More information about the pmwiki-users mailing list