Wiki Code Cookbook: Difference between revisions

From Portland NET Wiki
Line 104: Line 104:
==== Setting table width by percentage ====
==== Setting table width by percentage ====
Let's say you do not want a table to extend beyond 25% of the screen's width. You would mark that up as:
Let's say you do not want a table to extend beyond 25% of the screen's width. You would mark that up as:
 
<pre>
x
{| class="wikitable" style="width: 25%;"
{| class="wikitable" style="width: 25%;"
|+
|+
Line 116: Line 115:
|Info 2
|Info 2
|Info 3
|Info 3
|Info 4
|Info 4 But the content here is longer.
|}
|}
</pre>
This gets you:
{| class="wikitable" style="width: 25%;"
|+
!Column 1
!Column 2
!Column 3
!Column 4
|-
|Info 1
|Info 2
|Info 3
|Info 4 But the content here is longer.
|}
Note that the width of the individual columns will adjust spacing to fill 25% of the horizontal space.


== Media Embeds ==
== Media Embeds ==