You are here: Re: bgcolor « HTML « IT news, forums, messages
Re: bgcolor

Posted by Jonathan N. Little on 09/28/05 20:55

Beauregard T. Shagnasty wrote:

> booner wrote:
>
>
>>I was trying to simplify things - I have in fact used CSS - and done
>>very similar to what you described (the table is created dynamically
>>in ASP).
>
>
> Even easier, then.
>
> Within your loop:
>
> intCount = 0
> Do While Not oRs.EOF
> intCount = intCount + 1
> Response.Write "<tr>"
> If intCount Mod 2 = 0 Then
> strBgColor = "#ffffcc"
> Else
> strBgColor = "#ffffff"
> End If
> %>
>
> <td style="background-color: <%= strBgColor%>"> <%= [yourvariables]
> %></td>
> <%
> Response.Write "</tr>"
> ...
>
> You could even eliminate the style on every other row, if it was to
> match the background of the table or page...
>

Still would think using a class styling would be better option than
hard-coding the color into the ASP function. Then if later down the road
the site changes color schemes where now said table becomes illegible
you have to change the APS function. You can coordinate the change
better with CSS...

my $.02

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация