:) I have a table with forms in two colors - the first row is one color, the second is the other. Can you please tell me if there is a way to optimize my code?
I have two CSS classes:
tr.content1{
background-color: #EFF4FA;
}
tr.content2{
background-color: #F7FAFD;
}
And the table looks this way:
<tr class="content1">
<td>Previous Plan:</td>
<td>{{ form_row(form.prev_plan) }}</td>
</tr>
<tr class="content2">
<td>Previous Server:</td>
<td>{{ form_row(form.prev_srv) }}</td>
</tr>
There is also a problem this way - I get some text in the second column in front of the form field.
I would be really grateful if someone tell me how to fix and optimize that. :) Maybe something with https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig but I'm not sure if it will be better? Thank you very much in advance! :)
DLs maybe. But tables are still the ideal and most proper way of presenting tabular data. – Lèse majesté Aug 6 '12 at 16:16