The following topic has been approached in an other way a few days ago in topic http://forum.cmsmadesimple.org/index.php/topic,15627.msg78041.html#msg78041 (Thanks Alby for learning me a lot already). Since it is moving away from the original question (that included MySQL coding) I decided to ask the question in a hopefully clearer way:
Let's say there is a table like this:
Code: Select all
<table>
<tr class="odd">
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
<td>Row 1, Cell 3</td>
</tr>
<tr class="even">
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
<td>Row 2, Cell 3</td>
</tr>
<tr class="odd">
<td>Row 3, Cell 1</td>
<td>Row 3, Cell 2</td>
<td>Row 3, Cell 3</td>
</tr>
<tr class="even">
<td>Row 4, Cell 1</td>
<td>Row 4, Cell 2</td>
<td>Row 4, Cell 3</td>
</tr>
</table>Code: Select all
.odd {
background-color: lightgrey;
}
.even {
background-color: yellow;
}
table {
border: 1px solid black;
border-spacing: 0;
}
td {
padding: 4px 6px;
border: 1px solid black;
}
- put the table inside a User Defined Tag,
- the style information inside a Stylesheet and
- bring is all together in a Template attached to the stylesheet and calling the User Defined Tag?
I already entered clear (so without styling) table information into the User Defined Tag.
Code: Select all
<table>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
<td>Row 1, Cell 3</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
<td>Row 2, Cell 3</td>
</tr>
<tr>
<td>Row 3, Cell 1</td>
<td>Row 3, Cell 2</td>
<td>Row 3, Cell 3</td>
</tr>
<tr>
<td>Row 4, Cell 1</td>
<td>Row 4, Cell 2</td>
<td>Row 4, Cell 3</td>
</tr>
</table>Now the problem: As soon as I enter the styling of the table into the UDT by entering
Code: Select all
class="odd" .... etcetera
