Robert Cummings wrote:
> On Tue, 2007-07-03 at 17:57 +0200, Jochem Maas wrote:
>> Robert Cummings wrote:
>>
>> ...
>>
>>>> I'll add the CSS once I can get the form to work properly, and can  
>>>> figure out how to change the color with css based on a certain value  
>>>> stored in a database IE: $rowColor :)
>>> At it's simplest:
>>>
>>>     '<td class="'.$rowColor.'">'
>> ...
>> if $rowColor is a hex based value using it as a CSS class is not really 
>> going to work
>> that well, in such cases I would opt to use inline css:
>>
>> echo '<td style="background:', $rowColor, '">';
> 
> Inline CSS is as maintainable as bgcolor. if you're using inline styling
> then you've missed the point.

$rowColor is coming from a DB (that was my assuption based on the OP's story) - 
it's value is,
for example, '#ff0000' so it cannot be used as a CSS class .. the OP may not be 
in
a position to change the data in the DB. There may be a style/color choosing
interface in his app that makes things very maintainable (especially for the 
developer
because the user does the work).

missing the point is not all bad - especially when the point is on the end of a 
sword :-)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to