Pages: [1]   Go Down
  Print  
Author Topic: New classes for alignment shortcuts  (Read 304 times)
0 Members and 1 Guest are viewing this topic.
Sekoia
Titan Network Admin
Global: @Klyx
Server: Infinity

« on: July 04, 2009, 02:20:06 am »

Partially in response to Lin Chiao Feng's post, 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".
Logged
Sekoia
Titan Network Admin
Global: @Klyx
Server: Infinity

« Reply #1 on: July 04, 2009, 06: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. Smiley
Logged
Lin Chiao Feng
Minion

Global: @ChiaoFeng
Server: Virtue
Hero: Lin Chiao Feng
Villain: Lin Chiao Ryu

« Reply #2 on: July 04, 2009, 07:30:05 am »

Nice stuff.  And you knocked another 3 kB off the cheatsheet page!
Logged

A Mad Scientist discovers That Which Man Was Not Meant To Know.
A Mad Engineer creates That Which Man Was Not Meant To Have.
It's a subtle, but important, distinction: pure vs. applied insanity.
Pages: [1]   Go Up
  Print  
 
Jump to: