]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/img_vs_align.mdwn
fixed
[ikiwiki.git] / doc / bugs / img_vs_align.mdwn
1 The *[[ikiwiki/directive/img]]* directive allows for specifying an
2 *align* parameter -- which is of limited usability as the image is
3 embedded as `<p><img ...></p>`.  That's at least what I see on
4 <http://www.bddebian.com:8888/~hurd-web/hurd/status/>.  On the other
5 hand, CSS is supposed to be used instead, I guess.  (But how...  I forgot
6 almost of my CSS foo again ;-) it seems.) --[[tschwinge]]
7
8 > [[!img logo/ikiwiki.png align=right]]The [img tag doesn't create P tags](http://git.ikiwiki.info/?p=ikiwiki;a=blob;f=IkiWiki/Plugin/img.pm;h=32023fa97af8ba8e63192cacaff10a4677d20654;hb=HEAD), but if you have surrounded the img directive with newlines, they will result in paragraph tags.
9 >
10 > I've edited the URL you provided to demonstrate this -- hope you don't mind! I've also added an inline, right-aligned image to this page.[[!tag done]]
11 > -- [[Jon]]
12
13 > Contrary to all of the above, html does not care about P tags when
14 > floating an image to the left or right via align. Proof:
15 > <http://kitenet.net/~joey/pics/toomanypicturesofjoey/>, where the image
16 > is in its own paragraph but still floats. Also, I re-modified a local
17 > copy of the hurd page to enclose the image in a P, and it still floats.
18
19 > Tested with Chromium and Firefox. --[[Joey]]
20
21 >> Uh, sorry for not confirming what I supposed to be with looking into
22 >> the relevant standard.  It just seemed too obvious to me that the
23 >> closure of `<p>...</p>` would confine whatever embedded stuff may be
24 >> doing.  (Meaning, I didn't expect that the *img*'s alignment would
25 >> propagate to the *p*'s and would thus be visible from the outside.)
26 >> 
27 >> I confirm (Firefox, Ubuntu jaunty) that your picture page is being
28 >> shown correctly -- thus I suppose that there's a buglet in our CSS
29 >> scripts again...
30 >> 
31 >> --[[tschwinge]]
32
33 >>> It seems, the 'align=right' parameter gets filtered in my installation
34 >>> Are there other plugins, that could throw the parameter away?
35 >>> --[[jwalzer]]
36
37 >>>> Can't think of anything. htmlscrubber doesn't; tidy doesn't.
38 >>>> --[[Joey]]