]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/forum/formating:_how_to_align_text_to_the_right.mdwn
Merge branch 'master' of ssh://git.ikiwiki.info
[ikiwiki.git] / doc / forum / formating:_how_to_align_text_to_the_right.mdwn
index 0b334364936dd459aaec1ba99c50ed04f96a3359..2eaa29d02ed57960d21af70359536435e750a0ea 100644 (file)
@@ -1,4 +1,4 @@
-as in title, how to align text to the right?
+As in title, how to align text to the right?
 
 > Add to your local.css a class that aligns text to the right:
 
@@ -11,3 +11,18 @@ as in title, how to align text to the right?
 > by using the [[ikiwiki/directive/template]]
 > directive, with a template that contains the html. The 
 > [[templates/note]] template does something similar. --[[Joey]]
+
+>> Thanks!
+
+-----
+> Doing this myself and noted that [[ikiwiki/markdown]] down does not allow the enclosure of block level elements directly; and thus we cannot switch the `span` suggested above for `div` in changing block level elements (not if you wish to include markdown, anyway).  For example, I want to create a paragraph (with markdown text) which is right aligned, and so add the following
+
+>>     <span class="right_align">
+>>     This is my text with [a markdown link](/)
+>>     </span>
+
+> The *correct* thing to do here is create a template (as indicated above) **but** a workaround I found useful was to over-ride the `inline` nature of the `span` element, as follows
+
+>>     .align_right { display: block ; text-align: right ; }
+
+> you may also like to remove the padding and margins since they will be provided by the enclosing block. -- fergus