Titan Network

More Titan Projects => ParagonWiki => Formatting and Standardization => Topic started by: Sekoia on July 04, 2009, 07:20:06 AM

Title: New classes for alignment shortcuts
Post by: Sekoia on July 04, 2009, 07:20:06 AM
Partially in response to Lin Chiao Feng's post (http://cohtitan.com/forum/index.php/topic,2415.0.html), I just added some class stylings to the global Commons.css.

Following can be used on things like table cells and divs:

class="left"  (equivalent to style="text-align: left;")
class="center"  (equivalent to style="text-align: center;")
class="right"  (equivalent to style="text-align: right;")
class="top"  (equivalent to style="vertical-align: top;")
class="middle"  (equivalent to style="vertical-align: middle;")
class="bottom"  (equivalent to style="vertical-align: bottom;")

Following can be used on a table or a table row and will apply the indicated formatting on all of the cells (td and th) in the table:

class="cells-left"
class="cells-center"
class="cells-right"
class="cells-top"
class="cells-middle"
class="cells-bottom"

You can combine horizontal and vertical alignments, as in class="top right" or class="cells-center cells-bottom". You can even toss in other classes, such as class="wikitable cells-top".
Title: Re: New classes for alignment shortcuts
Post by: Sekoia on July 04, 2009, 11:58:35 AM
I added two more sets of class stylings. Instead of cells-left, you can now use either td-left or th-left to only apply left to the heading or non-heading cells. Similar for the other five alignments.

I also realized that it wasn't working with wikitable... so I fixed it. However, CSS stylings sometimes don't prioritize as expected so let me know if you try something and it doesn't work as expected. :)
Title: Re: New classes for alignment shortcuts
Post by: Lin Chiao Feng on July 04, 2009, 12:30:05 PM
Nice stuff.  And you knocked another 3 kB off the cheatsheet page!