Skip to main content
Inspiring
November 5, 2007
Question

Alternate row color for table question

  • November 5, 2007
  • 4 replies
  • 940 views
I'm alternating the row color on a table, and if I have a <a href> in
the table, the background behind the <a href> isn't the same as the row
color based on:

<tr bgcolor="###iif(currentrow mod 2,de('ffffff'),de('efefef'))#">

Is there a way to have the CSS that formats the <a href> change at the
same time as the background color for the row??
    This topic has been closed for replies.

    4 replies

    Inspiring
    November 6, 2007
    how bout this?

    <tr bgcolor="###iif(currentrow mod 2,de('ffffff'),de('efefef'))#">
    <td>
    <a href="" style="background-color: ###iif(currentrow mod 2,de('ffffff'),de('efefef'))#;">linktext</a>
    <td>
    </tr>


    Tiono
    Inspiring
    November 6, 2007
    Steve Grosz wrote:
    > How about a way to do it without having to learn something else (like a
    > framework??)


    have you even looked at jQuery before passing your judgement?
    it is the simplest thing on Earth after toasted bread. and is beautiful.
    give it a shot and i bet you you will never ever go back to regular js...
    oh, and yes, it will let you do what you want to do with the link
    element bg change.

    --

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    Inspiring
    November 5, 2007
    How about a way to do it without having to learn something else (like a
    framework??)

    Anyone done something like what I'm looking to do? Just change the <a href>
    formatting to go along with the inline iif shown below?

    <tr bgcolor="###iif(currentrow mod 2,de('ffffff'),de('efefef'))#">

    Steve


    "Daverms" <webforumsuser@macromedia.com> wrote in message
    news:fgn5vi$83b$1@forums.macromedia.com...
    > Hi,
    >
    > Try implementing the "JQuery" framework in your application. It really
    > minimizes the coding time and enables you to concentrate on development
    > alone.
    >
    > (Try Googling, You can find more JQuery solutions for this TR alternative
    > bgcolor issues, ).
    >
    >
    >
    >

    Inspiring
    November 5, 2007
    Yes, that method will work as well. That is how I usually alt colors in my tables.
    Inspiring
    November 5, 2007
    Hi,

    Try implementing the "JQuery" framework in your application. It really minimizes the coding time and enables you to concentrate on development alone.

    (Try Googling, You can find more JQuery solutions for this TR alternative bgcolor issues, ).