I am having this piece of code in which a style element is added. How can I add a second style element in the same echo? per example: color: orange;
echo '<span class=\'Meta\' style=\'min-height:inherit\'>'.T('Read by: ').$out.'</span><br>';
Just add the rule separated by a semi-colon, in the same style
attribute:
echo '<span class=\'Meta\' style=\'min-height:inherit; color:orange;\'>'.T('Read by: ').$out.'</span><br>';
I prefer using single and double quotes in combination, simpler to read and no need to escape quotes:
echo '<span class="Meta" style="min-height:inherit; color:orange;">'.T('Read by: ').$out.'</span><br>';
echo '<span class="Meta" style="min-height:inherit;color:orange">'.T('Read by: ').$out.'</span><br>';
The code needs to be more clear.
No need to add a new style
element.
You can add it as a new child to style with semi-colon ;
.
echo '<span class=\'Meta\' style=\'min-height:inherit; color:green; \'>'.T('Read by: ').$out.'</span><br>';
You can add more CSS properties by separating it with a ;
I would do the same thing differently, so as to make it more readable.
echo '<span class="Meta" style="min-height:inherit; color:green;">'
. No need for extra \