- <link rel="stylesheet" type="text/css" href="css@Lib:token"></link>
My problem is that as a player I do not have the ability to create a library token. So I created the css macro on my pc token and tried a zillion variations of this that did not work:
- <link rel="stylesheet" type="text/css" href="css@token"></link>
So I turned to Inline Style. Ugly and cumbersome as my table is pretty huge. Off to w3schools.com for a CSS refresher and learning about the Internal Style Sheet.
Internal Style Sheets pose a problem in that they contain characters that throw the macro engine into conniptions. So this is what I did that works. I expect I will be using this over and over again.
Here is my simple example.
First I open a Dialog
Spoiler
Code: Select all
[r,dialog("Condition","width=200; height=200; temporary=1; input=0; noframe=0"):
{
[macro("simpleTbl@token"): ""]
}]
simpleTbl
Spoiler
Code: Select all
<html>
<head>
<title>My Title</title>
[r,macro("css@token"):""]
</head>
<body>
<table id="myTable">
<tr> <th>Formatted Header</th>
<tr> <td>Unformatted Row</td>
<tr class="odd"> <td>Odd Row</td>
<tr class="even"> <td>Even Row</td>
<tr> <td>Unformatted Row</td>
</table>
</body>
</html>
css
Spoiler
Code: Select all
<!-- Internal Style Sheet
[h:stylesheet="
<style>
.odd { background-color: #FFFFFF; color: blue }
.even { background-color: #EEEEAA; color: black }
#myTable { background-color: #1133FF; color: #FFFFFF }
th { background-color: #113311; color: #FFFFFF }
</style>
"]
[r:stylesheet]
I hope others find this useful. Cheers.