[pmwiki-users] CSS magic for right-aligned text on the same line? (progress-bar)

Patrick R. Michaud pmichaud at pobox.com
Sun Dec 11 10:31:06 CST 2005


On Fri, Dec 09, 2005 at 10:03:48AM +0100, chr at home.se wrote:
> Hi
> 
> Is there anyone here that has created some CSS to produce a block which
> ends up right-aligned on the same line of text as from which the block
> comes? I'm looking for something that shows up like this in this example.
> First the markup.
> 
> 	* Bla bla (:righted to the right:)
> 
> which would look like this:
> 
> 	* Bla bla				to the right
> 
> What I'm really doing here is a directive to generate a progress bar using 
> very simple ascii art and <span>. Writing some markup like this:
> 
> 	List of tasks and their progress
> 	(:toc:)
> 
> 	Detailed list of tasks
> 	!! Task 1 (:progress-bar 50:)
> 	* do this
> 	* then that
> 
> 	!! Task 2 (:progress-bar 75:)
> 
> as illustrated here:
> 
> 	http://wiki.lyx.org/test/wiki/pmwiki.php/Test/ProgressBarTest1
> 
> Note the use of the table-of-contents to create a nice list of the status
> of all tasks, while having more details in each section. However, as it is
> right now I need to place the progress bar as the first thing to get a
> nice consistent indentation... This doesn't look so good for some
> headings, and it'd be much nicer if I could make the progress bar float as
> far as possible to the right side of the page. I tried fiddling some with
> the CVS but couldn't get a nice result.

Try something like:

!! %rfloat% progress 1 %% Task 1
* Item 1
* Item 2

!! %rfloat% progress 2 %% Task 2
* Item 1
* Item 2

See http://www.pmwiki.org/wiki/Test/RightFloat .

Pm




More information about the pmwiki-users mailing list